The past two "Tech Tips" columns have mentioned how to find help for UNIX commands (the man command) and how to list files in a directory using ls. The next step is to understand how to create new directories to better organize your file area. For example, you might want to keep information about gopher and ftp sites in a directory called "Internet" while other files such as downloaded pictures might go in a directory called "Images." With a well-organized directory structure, you can easily retrieve information you've saved, with little searching.
As you know by now, you have a directory where you begin when you first login to your UNIX account. This is called your home directory. If you think of the computer as a building, and directories as individual offices, you can consider your home directory to be your very own office. Since this is your office, you can organize it however you like! You can put all your magazines in one drawer of your desk, hang pictures on the wall, or even stack all your stuff right in the middle of the floor. Whatever you do in your office or home directory doesn't impact anyone else.
But as you might imagine, it's easier to have a well-organized directory structure just like it's better to keep your office as efficiently laid out as possible.
So how do you expand and explore your directory area? Use the cd, mkdir, and rmdir, commands to move between, create, remove directories. The pwd command is useful to check your current location.
Remember that UNIX is case sensitive. In other words, if a file or directory name has capitalized letters, you must type the name exactly as it's shown in order for the command to be successful.
A nice feature of the cd command is that if you type it without specifying a directory, you will return to your home directory. This is useful if you are many subdirectories away from your home directory and wish to quickly return "home."
If you create a directory that you no longer want, use the rmdir command to remove a directory. The format is similar to the mkdir command, as you must specify the name of the directory you wish to delete. This command removes the directory called "Books": rmdir Books
Note that a directory must not have any files in it in order for it to be removed. This is to help keep you from inadvertently losing files that you may want to save.
For additional information on any of these commands, remember that you can use the man command along with the command in question to get more details and options.