CuthbertDibbleGrub
IS-IT--Management
Files are being transferred to a local directory remotely (from a server with no rsh access). I'm writing a script to loop round every minute or so and action a file once it appears. I need to test whether the file transfer has completed fully.
I was going to...
a. Test that it's there with 'if [ -f filename ]'
b. Get file size with a combination of 'ls -l' and 'cut'
c. Sleep for a bit
d. Get file size again
e. Compare and loop if different otherwise action and move file
But surely there's a better way!
I was going to...
a. Test that it's there with 'if [ -f filename ]'
b. Get file size with a combination of 'ls -l' and 'cut'
c. Sleep for a bit
d. Get file size again
e. Compare and loop if different otherwise action and move file
But surely there's a better way!