Need help with RSYNC
hey guyz,
I am currently using rsync.. i have a problem though.. if i were to copy the files from the folder, and currently rsync is using the file, the mv will fail. Is there anyway to go around this to let the script know that the file is currently being used by rsync? |
If rsync is reading the file and you want to cp the file, that will work.
If rsync is reading the file and you want to mv the file, check cmds lsof, fuser. Ditto the latter if rsync is writing to the file. |
you're mingling two concepts here, copy files and the command mv which will move and/or rename files (from one location to another).
Making a copy of the file in use should not be a problem. |
i just want to use mv.
you suggested to use cmds lsof, fuser how do you use it and which one is better? becuase i will need to mv the file |
i tried rsync on the command losf...
but it can't seem to detect the file when its being transfered by rsync. but it doesn't have any probelms for ftp. any ideaS? |
Quote:
Code:
# file is the file to move. This should best be absolute path (and even realpath) |
All times are GMT -5. The time now is 05:40 PM. |