Created
October 27, 2015 00:13
-
-
Save samsargent/ff2ee1997d2ac34e9ef9 to your computer and use it in GitHub Desktop.
SSH Snippets
This file contains hidden or 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
# for the things I rarely do but often forget | |
# copy files via ssh | |
scp foobar.txt [email protected]:/some/remote/directory |
Update public_html symlink to application web folder
ln -s /home/username/application/current/web/ public_html
Find replace text across multiple files
perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.txt
Tar directory, exclude files
tar -czvf name.tar.gz --exclude .git --exclude "*.log" .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
untar but ignore existing files (don't overwrite)
tar --skip-old-files -xzvf media.tar.gz