The use of Terminal is quite dominant in Linux, especially for someone who is not concerned with graphical interface (e.g: Linux used as Server). Terminal‘s function is like Command Prompt‘s function when in Windows, executing text based command. (Distro I used: Ubuntu 9.10 Karmic Koala)
Usually, when executing a command in Terminal, if we -as linux user- don’t know the use of history command, we will call again and again the command although it’s the same command. So, if we would like to fast recalling our previous command, we could use the history command and query previous command.
Figure 1 is a way of executing the history command (without any arguments). As we seen, it generates list of commands we have executed. The left side (number) indicating the queued command number and the right one indicating the executed command. We could recall the command in the generated list using:
!command_number
Figure 2 is a sample of recalling the command.
!25 will recall the command number 25 as seen in Figure 1.
But, the question is, “Should we call history when we want to recall a command?” Actually NO! We could recall using more simple query with just using a key combination (Ctrl+R) and write the pattern of command we would to search.
As we push (Ctrl+R), the line would become (reverse-i-search) ”: and then we could write down the pattern. Figure 3 shows us how to recall the command with pattern (grou) and finally the complete command will appear on the right side of colon.
That’s all… And pardon me about my English 😛
Bismillah…
ju2r sbner’y kurang ngerti mslah IT apalagi pk english..hehe
hebat!!!
Sekedar nulis sambil belajar English ^^
walau saya agak kurang familiar sma linux tp ane hadir pak… 😀
salah satu murid babak di itats 3:)
(y)
interesting … i’d wait your next posting,
Thanks 🙂
hahaha sometimes I also write using english really, thank you infonya
Nice post,thanks for sharing,very useful
Visit Us
Thanks.
good post