美文网首页
Command Line in Mac

Command Line in Mac

作者: thebestofrocky | 来源:发表于2018-04-21 05:35 被阅读7次
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

      本文链接:https://www.haomeiwen.com/subject/siytlftx.html