scp/ssh tail(multiple file) remote copy
I currently have a crontab running a script like so..............
/usr/bin/scp username@x.x.x.x:/data/noaa/bigross/'*.Z' /data/products/hrpt/bigross/
/usr/bin/scp username@x.x.x.x:/data/noaa/ross/'*.Z' /data/products/hrpt/ross/
/usr/bin/scp username@x.x.x.x:/data/noaa/mcmu/'*.Z' /data/products/hrpt/mcmu/
/usr/bin/scp username@x.x.x.x:/data/noaa/spole/'*.Z' /data/products/hrpt/southpole/
I want to incorporate something like ls -tr | tail -3, so I can get the last three files to date, instead of all. I don't mind changing the script to use ssh login first. Please advise. Thanks Ahead.
TPR
|