From the course: Linux: Shells and Processes
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Shell pathname tricks - Linux Tutorial
From the course: Linux: Shells and Processes
Shell pathname tricks
- [Instructor] There are shortcuts that will save you time on the command line. Let's investigate some pathname shortcuts. Type in to a terminal cd .. and then hit Enter. Now type in pwd, which stands for print working directory, and hit Enter again. Your working directory being the one that you're currently in. Using cd .. takes you to the parent directory, which is one level higher in the directory tree than where you were. The parent directory of /home/user1 is /home. Another location shortcut is specified using a single dot character. Type in cd . and hit Enter, and then verify where you are with pwd. Notice your location did not change. The single dot is a shortcut to your current directory. You may be wondering why you'd need a shortcut to where you already are. The dot is not useful for the cd command, but you may want to copy files to your current directory. So instead of typing in the whole path, you could…
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
-
-
-
About Linux shells6m 21s
-
About Linux terminals1m 50s
-
(Locked)
Shell pathname tricks7m 7s
-
(Locked)
Shell history tricks3m 29s
-
(Locked)
Configure shell history6m 59s
-
(Locked)
Variables and shell environment5m 33s
-
(Locked)
Make shell variables persistent6m 48s
-
(Locked)
Pattern matching with globs5m 9s
-
(Locked)
Globs exercise6m 42s
-
(Locked)
Pattern matching with extended globs6m 25s
-
(Locked)
Extended glob exercise4m 22s
-
-
-
-
-