Some Helpful Unix Commands

ls                          list contents of the current directory
ls -l                       lists contents and shows more details
ls -a                       lists all files, including hidden files (that start with dot)
ls -al

cd                          returs to your initial (home) directory
cd folder_name              goes to the specified directory

pwd                         displays the current directory you are in

mkdir folder_name           create a new directory

rmdir folder_name           deletes a directory that is already empty

rm file_name                deletes a file
rm *                        deletes all fiels in the current directory, dangerous!!!
rm -R folder_name           deletes the directory and its contents, very dangerous!!!

vi file_name                runs a vi editor and opens or creates a file, youmust know vi first!
pico file_name              runs a pico editor and opens or creates a file, pico is easy to use because it is as simple as notepad

chmod a+r file_name         changes access mode on a file so that everyone can read it
chmod a+r *                 changes access on all files
chmod a+rx folder_name      changes access on a directory so that everyone can read it
chmod a-w  file_name        makes a file read only
chmod u+w  file_name        makes file writeble to you (u-user, a-all)
chmod a+w  file_name        makes fiel writealble to everone. Shoud be avoided! You do not want other people to alter your Web pages!!!
chmod a+rx file_name        changes access on a file so that everyone can read it or run it as a program or as a CGI script
    more details:
        initial option: -R execute recursively on all files inside of a specified folder and its subfolders
        first  letter:  a all; u user (you); g group (all students); o all other people;
        second letter:  + enable access; - disable access
        third letter:   r read; w write; x access for folders; x executable for files;
    more complicated example:
        chmod -R a+rx,go-w ~/public_html

man command                 runs help for the given command name
man ls
man chmod
...

exit                        logs you off from the Unix machine

pine                        runs a Unix email software

web site front Index Page general bookmarks software bookmarks go back copyright info