[mdlug] Run scrip on file arrival

Aaron Kulkis akulkis00 at gmail.com
Tue Mar 1 09:57:04 EST 2011


Stan Green wrote:
> I have two Debian systems; one user system and one server. The first system is 
> used to create files. It includes a script that copies the video file to the 
> other system for processing and storage. The copy is done over NFS. The hard 
> part seems to be staring the processing on the file only after is is fully on 
> the other box. I would rather not do a time based process due to issues with 
> the file being still being copied. My thought was to create a small file and 
> send it after I send the main file. This way the script could run every 5min 
> and wait for the small file to arrive. It could then process all the video 
> files and delete the small file. I have seen this type of setup used before and 
> it seems to work. However is there a better way to accomplish this task?
> 

scp  file  remotehost:/some/path/to/file
ssh remotehost /some/script/to/run



More information about the mdlug mailing list