A Few Unix Commands

You'll find it easier to work on home pages if you can use five or six simple Unix commands.

How To Get To Unix

If a menu appears when you log into your account, select whatever menu item allows you to Enter Unix, or Quit to Unix Shell, or Exit to Shell.

Basic Commands

ls
lists files in your current directory.

mkdir
makes a directory. It is followed by the name of the directory you wish to create. For example, mkdir html will create a directory called "html" and place it inside the current directory.

cd
changes the current directory. It is followed by the name of the directory to which you wish to move. For example, cd html will change to the html directory inside the current directory. And cd .. will move to the directory that contains the current directory.

pico
edits a file. For example, pico myfile lets you edit a file named "my file". If the file has not yet been created, pico will create the file. Pico is a very simple editor.

chmod
changes the permissions ("mode") associated with a file. For example, chmod a+r myfile changes the permissions for the file named "myfile" so that everyone can read it.

Because this command is so counterintuitive, mail.SAS (and some other machines on campus) allow you to change permissions for all of your WWW files at once by typing: permissions
mv
moves a file or renames it. For example, mv oldfile newfile lets you give "oldfile" a new name, "newfile".
rm
removes a file. For example, rm myfile removes the file named "myfile".


Return to home page workshop

Last Modified: December 14, 2005

Please direct comments and questions to:

JavaScript is required to view this email address