(myname@gamba)Whenever you see this prompt, you can type commands into the window. First make sure the window is active, however.
If you are using the Motif window manager, find a piece of exposed root window and click the right mouse button to bring up the root window menu. Then, select New Window (which really is a misnomer, and should be called "Launch X terminal"). Just as above, new window should appear, with a prompt which looks something like:
MyFile.txt Picture.gif Dir2 Stuff.docThis example directory has four files in it, of which one is a directory in its own right. To see a listing of this sort, you must use the ls command (short for 'list'). Make a terminal window the active window on your display, and at the prompt type ls and then press RETURN.
The directory which the ls command shows you is the shell's idea of its current directory (also called working directory). Each shell has a current directory to help you avoid typing the same directory name over and over. To find out the name of the current directory, type pwd (Print Working Directory) and press RETURN.
You can make any directory become the current directory, by using the change directory command, cd, like this:
cd Dir2Simply give the name of a directory as a command line argument, and cd moves your shell into that directory.
To move a file, use the mv command. For example, to move Project.m up one directory from the current directory, type:
mv Project.m ..
You can also move directories this way.
Renaming a file is just a special case of moving a file, where you give the new filename. For example,
mv Project.m Junk
renames the file Project.m to Junk, and leaves it in the current directory. If a file named Junk already exists, this can overwrite it, so be careful!
tells Unix to find the file named Junk in the current directory, and erase it. A word of warning is in order here for those used to the Macintosh trash can and the undelete commands available in MS-DOS: There is absolutely no way of recovering a Unix file that has been deleted using the rm command!
You cannot remove a directory in exactly the same way as an ordinary file, but instead, the command rmdir allows you to remove an empty directory. You must remove all the contents of the directory yourself.
ls Map.txtThe filename Map.txt is an argument to the ls command. Each command has a set of allowed arguments, with special meanings for that command. ls takes any number of filenames and directory names and lists them. This is in contrast to the default behaviour of ls, which is to list the entire current directory.
Each argument must be separated from the other arguments--and from the command name--by spaces and/or tab characters. This is how the shell determines the end and beginning of each argument.
ls -l Map.txtNotice how the switch comes before any other argument.
Some commands allow you to group switches behind a single dash, like ls -FCd. Some do not. It is necessary to read the manual page in order to be sure. While this sounds confusing, it rarely causes problems once you get used to it.