Building 3D Models for the Web

Summary of Unix Commands

The SGI workstations and the DECstations use variations of the Unix operating system. These are some of the most common commands that you can use on the SGIs.

Directory Structure

Fundamentals

Directory names are separated from subdirectory names and file names by the / character. For example, if I refer to the file
/usr/people/hedonley/public_html/index.html
then the file is named index.html. It is located in the public_html subdirectory of hedonley, which in turn is a subdirectory of people, which is a subdirectory of usr, which is a subdirectory of the top level directory, /. This top level directory is called "root".

Absolute and Relative Pathnames

If a reference to a file or directory starts with a /, like the example above, then this is called an absolute pathname. If it does not start with a /, then it is a relative pathname and the path starts relative to the current directory. For example, if I am already in /var/www/htdocs, then the relative path, courses/ls499/index.html, refers to the file /var/www/htdocs/courses/ls499/index.html.

Shortcut Names for Directories

As in DOS, . means the current directory, and .. means the parent directory--the one immediately above the current directory. ~ means the user's home directory and ~hedonley means hedonley's home directory, that is, /usr/people/hedonley.

Some Important Directories

Directory NameMeaning
/usr/people/username username's home directory
/usr/people/username/public_html username's Web directory
/var/www/htdocs main Web directory

Unix Commands

Working with Directories

CommandUsageMeaningExample
pwdpwdprint working (current) directorypwd
mkdirmkdir dirmake a directorymkdir public_html/pics
rmdirrmdir dirremove an empty directoryrmdir pics
cdcd dirchange working directory to dircd /var/www/htdocs
lsls dirlist the filenames in dir. If dir is not specified, list contents of current directoryls ../pics
ls -l public_html
chmodchmod mask dirchange access permissions specified in mask to dirchmod 755 pics

Working with Files

CommandUsageMeaningExample
rmrm file1 file2 ... filenremove file or filesrm *.gif
cpcp file1 file2copy file1 to file2cp index.html index.bak
cpcp file dircopy file to another directory, keeping the same filenamecp village.wrl /var/www/htdocs/jungle
mvmv file1 file2move or rename file1 to file2mv ~/public_html/brick1.gif /var/www/htdocs/iupsouth/brick.gif
catcat file1 [file2]display contents of file, or catenate contents of file to file2cat village.wrl
lplp -dprinter fileprint file on printer named printer, send to default printer if -d option is not specifiedlp village.wrl
picopico fileedit existing file or create a new onepico village.wrl
chmodchmod mask filechange access permissions specified in mask to filechmod 644 village.wrl

Getting Help

CommandUsageMeaningExample
manman commanddisplay manual page about commandman chmod

Maintained by H. Edward Donley <hedonley@grove.iup.edu>
Last Modified Monday, 13-Aug-2001 16:53:27 EDT