Monday, 1 April 2013
Command Line Shortcuts History MAC & LINUX
Command Line Shortcuts History
14 cd /tmp
15 ls -1
16 cd
17cp /etc/passwd .
... output truncated ...
History
In Addison to the basic command recall with the arrow keys,the bash history mechanism support a variety of advanced ways of retrieving command from the history list.
!! repeats last command ,
!char repeats last command that started with char
!num repeats a command by its number in history output
To view command with the history number,use the history command.
Other slightly more advanced history tricks include:
!?abc repeats last command that contains(as opposed to ?started with?) abc
!-n repeats a command entered n commands back
Use ^old^new to repeats the last command with old changed to new,for example:
[student@stationX ~]$ cp filter.c /use/local/src/project
[student@stationX ~]$ ^filter^fronted
cp filter.c /use/local/src/project
THANK YOU FOR VISITED GURU NETWORK I HOPE LIKE THIS TOPIC
Author: Kuldipsinh
Hi! I am Kuldipsinh,a certified Indian Network Consultant,Pro Blogger,Computer Engineer Software Editor and an addicted Web Developer. Read More →
Related Posts:
COMMAND LINUX
Subscribe to:
Post Comments (Atom)
0 comments: