Skip to content

Instantly share code, notes, and snippets.

@sharkoz
Created April 20, 2013 19:14
Show Gist options
  • Save sharkoz/5427041 to your computer and use it in GitHub Desktop.
Save sharkoz/5427041 to your computer and use it in GitHub Desktop.
[Shell] Secure copy to another server using own logname
put(){ txt=$(logname); scp "$1" ${txt}@serveradress:/home/path/; };
@sharkoz
Copy link
Author

sharkoz commented Oct 17, 2013

To change the permissions on the remote file :
rsync --chmod=u+rwx,g+rwx,o+rwx /path/to/file server:/path/to/file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment