I’m in a red hat environment.
I need to move a file from server A to server B when a file is available in a folder F.
THere’s no constraint on the method used. Is it possible to trigger this event in python or any other scripts?
It could be run as a daemon but I’m not sure how to do that.
Any advices?
Very simple to implement in BASH and also in Python:
Here is my 2 Cent BASH example:
Run this in a shell, you’ll see the message sleeping every 3 seconds.
Then from another shell session to in the directory where you ran the script do “touch
NameOfFile” the script will break and try to launch the script YourScriptToLaunch.