Tuesday, October 22, 2013

Shell comand

`cd -` -  toggle between current and last folder
`sudo !!` - run previous command with `sudo`
` <comand>` - without saving to history (space before comand)
`>file.txt` - create new or clean old file
`^foo^bar` - replace in previous command `foo` to `bar`

`tail` - output the last part of files
`tail -100f <file>` - show last 100 line of file and continue reading

`lsof` - list open files
`lsof -i :9000` - show process which use 9000 port

No comments:

Post a Comment

 
 
Blogger Templates