Basic Unix Commands for Maintaining Web Pages

Here are some of the commands you may need to use when maintaining Web pages. See the Academic Technology and Networks document UNIX: Getting Started for more information about Unix.
cd
Change directory to home directory.

cd ..
Change directory to next higher level.

cd directoryname
Change directory to the directory named directoryname.

chgrp
Command to change the group that is associated with a file or directory. See "Controlling Ownership and Read/Write Access" for more information.

chmod
Change the access mode of a file; use this command to control who can read and/or write to files. See "Controlling Ownership and Read/Write Access" for more information.
cp
Copy; similar to move (mv) but the original file or directory remains intact; to copy a directory, use cp -r olddir newdir.

exit (or CTRL-D)
Exit from newgrp command; also exit the command prompt, log off.

ln -s filename index.html
Make index.html an alias for filename; you should have a file named index.html in every Web directory.

logout
Quit UNIX.

ls -al
List all files in the current directory with lots of information, including date last updated (omit l for a simple list).

mkdir directoryname
Make (create) a directory named directoryname.

mv oldpath/oldname newpath/newname
Rename (move) the file oldpath/oldname to newpath/newname. Either oldpath or newpath may be omitted, in which case the current directory is used. If oldname is a directory, the directory and all the files within it are moved to the new location. If newname is a directory, then oldname is moved inside of newname. To move a file or directory in another directory to the current directory, replace newpath/newname with a dot (.).

newgrpgroupid
Change to work with files and directories owned by the specified groupid. See "Controlling Ownership and Read/Write Access" for more information.

pico filename
Edit the file named filename; use <CNTL>- x to quit; for more information on pico, see the Academic Technology and Networks document Pine & Pico Introduction.

pine
Enter your electronic mailbox; type q to quit; for more information on pine, see the Academic Technology and Networks document Pine & Pico Introduction.

pwd
Display present working directory.

passwd
Change password.

rename
There isn't a rename command; you move (mv) the file to its new name.

rm filestem*
Remove (delete) all files beginning with filestem; if you omit the asterisk (*), you must specify the complete file name; if you omit filestem (specifying only the asterisk), you'll delete all the files in the current directory.

rm -r directoryname
Remove (delete) the directory named directoryname and all the files in it.

homepage
The command you issue on fog when you log onto your userid for the first time; homepage creates your public_html directory and makes it known on the fog.ccsf.cc.ca.us machine as http://fog.ccsf.cc.ca.us/~userid/. The command also creates a skeleton index.html file with the correct permissions; you will need to edit the file.

<CNTL>- c
Abort a command or program execution

___________________________________CCSF___________________________________

[Web Weaver] [Web Weaver] [CCSFweb] [CCSF Info] [Events] [Site Index] [Help]