Red Hat Enterprise Linux 4: Red Hat Enterprise Linux Step By Step Guide | ||
---|---|---|
Prev | Chapter 3. Managing Files and Directories | Next |
In many ways, directories are treated like files. They can be created, deleted, moved and copied from Nautilus or from a shell prompt, using commands similar to those for files.
You must have write permissions in a directory in order to create a new sub-directory. Most users have these permissions in their home directory (and its sub-directories) and the /tmp/ directory.
To create a new directory with
Nautilus, navigate to the location
of your new directory. Right-click in a blank portion of the
window and select Create Folder. A new
folder icon appears with the highlighted text
untitled folder. Type a name for your
folder and press
To create a new directory using a shell prompt, use the command mkdir. Enter: mkdir <directory-name>, replacing <directory-name> with the intended title of the new directory.
To delete a directory from Nautilus, right click on it and choose Move to Trash, or click and drag the icon to the Trash on the Desktop.
To delete an empty directory from a shell prompt, enter the command rmdir. To delete a directory that may not be empty (and consequently everything inside that directory), enter the command rm -rf <directory>. Refer to Section 4.5.5 Delete files with rm for more information regarding the rm command.
Applications create "dot" directories as well as dot files. Dot files are a single hidden configuration file — a dot directory is a hidden directory of configuration and other files required by the application. The non-configuration files in these directories are generally user-specific, and will be available only to the user who installed them.