Directory Operations

cd

Change your current directory.

pwd

Print the name of your current directory, i.e., “where you are now” in the filesystem.

basename

Print the final part of a file path.

dirname

Print the name of a directory that contains a file.

mkdir

Create (make) a directory.

rmdir

Delete (remove) an empty directory.

rm -r

Delete a nonempty directory and its contents.

We discussed the directory structure of OS X in The Filesystem. Now we’ll cover commands that create, modify, delete, and manipulate directories within that structure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.143.181