Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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