Created
September 19, 2012 19:39
-
-
Save johanlaidlaw/3751757 to your computer and use it in GitHub Desktop.
Useful linux commands that I never can remember
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
#Create ssh keys | |
ssh-keygen -t rsa -C "[email protected]" -f id_rsa.MyService | |
#Empty a file (owned by you) | |
> file.log | |
#Empty a file owned by root | |
#Copy a file from server over ssh | |
scp [email protected]:myfile.log myfile.log | |
#Get every nth line of a file (get line 1 and then take every 3rd line) | |
sed -n '1~3p' myfile.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment