University of Rochester

Need Help


Stay Secure

Get Connected

Need Technology?


Incoming Students

Students

Faculty/Staff


Office of the Vice President for IT and CIO

myIdentity

Other IT Resources

IT Notices/Outages

About University IT


University IT Home

University IT » Web Services » Help » Unix

A UNIX Quick Reference Guide for Web Authors

ls
list files in current directory

 

cp filename1 filename2
copies filename1 to filename2, without deleting

 

mv filename1 filename2
moves filename1 to filename2, deletes filename1. This is, in effect, renaming filename 1.

rm filename
deletes (removes) filename

cd ..
back up one directory

 

cd dirname
move down one directory into dirname

 

mkdir dirname
Create a subdirectory called dirname

 

rmdir dirname
Remove a subdirectory called dirname. Directory must be empty.

 

rm -r dirname
Deletes a directory and ALL University IT CONTENTS, including subdirectories and their contents. Be very careful: you cannot undelete anything.

 

Wildcard (*)
You can use the * symbol as a "wildcard" to match all files. For example, rm * deletes all files in the current directory (be careful!). joe index* is equivalent to joe index.html if there is only one file in the current directory beginning with index. If there is another one, say index.htm, you will get an error. Other commands will not give you an error, but will merely act on all matching files. In this case, mv index* morepages would move index.html and index.htm into the subdirectory morepages.

 

See also:
Using pico to Edit Files On-Line
Logging on to www.rochester.edu