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

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…

Contents