How to get lastest modified timestamped file in remote folder using script?
Meaning, after "cd remote_folder", I wanna "get file", which this file has latest modification timestamp at remote directory.
# make copy of the latest file with unique extension, # so that it can be grabbed by file mask # (note that you can make the copy in /tmp if needed) call cp `ls -t | head -1` `ls -t | head -1`.latest # download the copy, but strip the extension get *.latest *. # remove the copy rm *.latest
I am trying to do the same thing but problem is I need to have during the week 1 file and oon the weekend I need 3 files.
I need to have them by timestamp so easier to get by date. What would the code look like.
You can post new topics in this forum