The mkdir Command

As mentioned earlier, directories are basically used to organize data. You may have experienced instances where you have one directory with hundreds of files. It would not be easy to find anything quickly unless you memorize every filename on your system.

Think of a phone book or telephone directory: The Unix directory is much the same. What if all businesses in your area were only listed in alphabetical order? How does that help you? How could you call an electrician, plumber, or anyone else unless you had groups of similar categories organized for quick retrieval? This is exactly why you need directories—for the simple organization of data on your Unix system. In this part of the lesson, we will learn to make directories.

To make a directory, you can do the following:

1.
Choose an organizational structure, and name your new directory.

2.
Issue the mkdir command as mkdir <directoryname>.

For example:

> mkdir test

This creates a new directory named test, which will be located in the current directory. To find the current directory you are in, you can issue the pwd command, and then the mkdir command. Doing an ls will show you the contents. So, now that you know how to make a directory, you will need to know how to delete it from your Unix system as well.

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

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