From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Command history - Linux Tutorial
From the course: Cert Prep: LPIC-1 Exam 101 (Version 5.0)
Command history
- Using the shell's history can keep you from having to type in commands over again. If you want to just bring up the last command you may want to use your up and down arrow keys. If you want to see what commands you've typed in use the history command by typing in 'history' into a shell. History shows the most recent commands we've typed up to the shell limit. The limit is usually 500 or 1,000 items depending on the configuration. If you want to bring back the entire last line from the history, type in '!!' and hit enter. In my case, it's the history command which we just typed in. If you want to execute the command four lines from the bottom, you'll use '!-4' and hit enter. Type in 'history' again to see the list. We can see that four lines from the bottom was the clear command, for me, for you it may be something else. If you want to run a specific line, just specify the number after the exclamation point.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Simple and compound commands5m 59s
-
(Locked)
Modify the shell environment6m 42s
-
(Locked)
Command history3m 30s
-
(Locked)
The PATH and command execution3m 29s
-
Named and unnamed pipes3m 58s
-
(Locked)
Use input-output redirection (>, >>, |, 2>, etc.)5m 2s
-
(Locked)
Use text filters7m 3s
-
(Locked)
Find files using locate4m 51s
-
(Locked)
Finding files with find4m 47s
-
(Locked)
Finding text in files with grep5m 55s
-
-
-
-
-
-
-