Created
December 11, 2015 12:28
-
-
Save ozgun/5d7e8c0f3e229f2fd92f to your computer and use it in GitHub Desktop.
Download last file from remote server with ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE_TO_DOWNLOAD=`ssh [email protected] 'ls -Art /tmp/dir |tail -n 1'` | |
scp [email protected]:/tmp/dir/${FILE_TO_DOWNLOAD} . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment