1Z0-821 practice question 17 of 30

You are currently working in both your home directory and the system directory /tmp. You are switch back and forth with full path names. Which pair of cd commands will provide you with a shortcut to switch between these two locations?

Full set: 243 questions
Answer options
A: cd ~ and cd – Correct answer
B: cd and cd.
C: cd ~ and cd
D: cd * and cd . .
Correct Answer:
A. cd ~ and cd –
Explanation

In the Bourne Again, C, Korn, TC, and Z shells, the tilde (~) is used as a shortcut for specifying your home directory. cd – It's the command-line equivalent of the back button (takes you to the previous directory you were in).
Note: To make certain that you are in your home directory, type the cd (change directory) command. This command moves you to your home (default) directory.

Scroll to Top