Changes directories to the parent directory—in this case practice, where you just put myprofile.

rm means “remove,” so this deletes myprofile. Be careful! Deleting a file on a GNU/Linux system is _permanent_—there is no undelete. If you rm it, it’s _gone, forever_. Be careful! To repeat, deleting a file on a GNU/Linux system is _permanent_—there is no undelete. If you rm it, it’s _gone, forever_.

Debian GNU/Linux : Guide to Installation and Usage — Part 45

rmdir is just like rm, only it’s for directories. Notice that rmdir only works on empty directories. If the directory contains files, you must delete those files first, or alternatively you can use rm -r in place of rmdir.

Debian GNU/Linux : Guide to Installation and Usage — Part 45

This moves out of the current directory, and into its parent directory. Now you can type the following:

Debian GNU/Linux : Guide to Installation and Usage — Part 45

This will delete the last remnants of your practice session.

So now you know how to create, copy, move, rename, and delete files and directories. You also learned some shortcuts, like typing simply cd to jump to your home directory, and how . and .. refer to the current directory and its parent, respectively. You should also remember the concept of the _root directory_, or /, and the alias ~ for your home directory.

When you type ls, files beginning with a dot are not listed. Traditionally, files that contain configuration information, user preferences, and so on begin with a dot; these are hidden and out of your way while you do your day-to-day work. Sample dot files are ~/.emacs, ~/.newsrc, ~/.bashrc, ~/.xsession, and ~/.fvwmrc. These are used by Emacs, news readers, the Bash shell, the X Window system, and the fvwm window manager, respectively. It is conventional to end the dot filename with rc, but some programs don’t. There are also directories beginning with a dot, such as ~/.gimp and ~/.netscape, which store preferences for the Gimp and Netscape.

Sometimes a program will create a dot file automatically; for example, Netscape allows you to edit your preferences with a graphical dialog box and then it saves your choices. Other times you will create them yourself using a text editor; this is the traditional way to do it, but you have to learn the peculiar format of each file—inconvenient at first, but it can give you a lot of power.

To see dot files, you must use the -a option to ls. The long form of -a is -all, if you find that easier to remember. You can also use -A or -almost-all, which displays all dot files except . and ... Remember that . is the current directory, and .. is the parent of the current directory; because these are guaranteed to be in every directory, there is no real reason to list them with ls. You already know they are there.