1,! $Is a special environment variable, which represents the last string of the previous command. For example, you may:
You can change it:
$ Mkdir mydir
$ MV! $ Yourdir#$ MV mydir yourdir
$ CD! $
2,^ Old ^ new
Replace some strings in the previous command.
Scenario:Echo "wandreful"In fact, it is intended to outputEcho "wonderful". Only^ A ^ oThat's all. It can be of great help for spelling long commands. (Chen Hao Note: it can also be used!! : GS/old/new)
3List the largest objects in the current directory
Du-S * | sort-N | tail-N 3
4,Date-d @ 1234567890
Time cut-off time
5,Man ASCII
DisplayASCIICode table.
6, Listening port
Netstat-anOP | grep SSH
Netstat-Tlnp //Listening port
7,SSH user @ server bash </path/to/local/script. Sh
Run a script on a remote machine. The biggest advantage of this command is that you do not need to copy the script to a remote machine.
SSH user @ host CAT/path/to/remotefile diff/path/to/localfile-
Compare a remote file with a local file
8,Vim SCP: // username @ host // path/to/somefile
VimA Remote File
Original article:
Http://news.cnblogs.com/n/164643/