|
发表于 2005-1-27 16:17:37
|
显示全部楼层
Post by baif
不断扩充中,其实还有很多没有发现。。。
:cool:
Subtitution commands and operators
Symbol
Meaning
Example
Effect
-
!
Specify which part of command to subtitution !cat
Redo last cat command
-
!!
Redo previous command
!! > file
Redo last command and send output tu file
-
!n Substitute event n from history
!3
Go to the 3nd command
-
!-n
Substitute last command begining with command
!flie > tmp
Redo the last find command and send output to temp
-
:
Introduce argument specifies
date > !:3
Run the date and send output to third file from last command
-
*
Substitute all argument
cat !ls:*
cat files listed as arguments to last ls command
-
$
Substitute last argument
mv ! nowdir
Move Last file from previous commands to newdir
-
n
Substitute nth argument
rm !:4 !:6
Rm 4th and 6th files named in last command
-
s/abc/def/
Switch abc to def
!cat:s/kron/korn/
Redo last cat command, changing kron to korn
-
^abc^def
Run last command and change abc to def
^oldfile^old-file
Redo previous command, changing oldfile to old-file |
|