Skip to content

Instantly share code, notes, and snippets.

@ozgun
Created December 11, 2015 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozgun/5d7e8c0f3e229f2fd92f to your computer and use it in GitHub Desktop.
Save ozgun/5d7e8c0f3e229f2fd92f to your computer and use it in GitHub Desktop.
Download last file from remote server with ssh
FILE_TO_DOWNLOAD=`ssh ozgun@app1.dev 'ls -Art /tmp/dir |tail -n 1'`
scp ozgun@app1.dev:/tmp/dir/${FILE_TO_DOWNLOAD} .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment