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, is to output echo "wonderful ". You only need ^ A ^ o, which is helpful for spelling long commands. (Chen Hao Note: You can also use it !! : GS/old/new)
3. List 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
Displays the ASCII code table.
6. listening port
Netstat-anOP | grep SSH
Netstat-tlnp // listener 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
Vim Remote File
Original article:
Http://news.cnblogs.com/n/164643/