Command Line in Mac

cd..

will back the directory up by one.

If you want to reach a folder in the parent directory, you can do something like

cd ../foldername. 

You can use the ".." trick as many times as you want to back up through multiple parent directories. For example,

 cd ../../Applications 

would take you to Macintosh HD/Applications

cd

If you type cd and press the Return key—with no directory specified—you’ll go back to your Home folder. (You can also type cd ~ to go there.)

If you type

cd /

you’ll go to the root level of your startup disk.

If you type

cd .. 

(that’s two periods), you’ll go to the directory above the one you’re currently in.
So if you’re in your home folder, and type cd .., you’ll go to your Mac’s /Users folder.

And if you type

 cd - 

(hyphen) you’ll go back to the directory you were in before the last time you issued the cd command.

你可能感兴趣的:(Command Line in Mac)