Unix How To
Remember you may also access Learning the Unix Operating System at the Safari Tech Books OnLine website
Don't forget that most Unix shell commands are lower case and that spaces between commands, options, and filenames are important.
- Some useful Unix shell commands:
- cd directory name change directory.
- cp oldfilename newfilename create a copy of an existing file.
- logout will log you off a Unix computer.
- lp filename send a file to the printer.
- ls displays a list of files. Some useful options include -l or -lg
- man command gives you the manual page for a particular command.
- mkdir directory name create a directory (also known as a folder).
- more filename look at the content of files; the command will display about 24 lines at a time and then wait until you tap the space bar for more or the q key to quit.
- passwd used to change your password. Remember that there are "good" passwords and "bad" passwords. Good passwords have upper and lower case letters, special characters, numbers and might be an acronym.
- | pipe symbol. Used to take the output from one command and pipe it into another.
eg. pc hmwk1.p | more or pc hmwk1.p | lpr -h
- rmdir directory name remove a directory (also known as a folder). You can use rmdir -rf directory name but be careful with this one as it removes the directory and all its contents.
- Some useful Unix software applications:
- g++ filename.cpp c++ compiler.
- javac filename.jav java compiler.
- pico filename used to create or edit a file. c++ programs should all end in .cpp, java programs should end in .java
- pine used to manage your email. You may use this application to read, send or delete email.
- sftp hostname used to transfer files to a remote computer.
- ssh hostname used to login to a remote computer
- How to forward your CS email:
- Login to your CS account
- Create a file and name it .forward (the period is important)
- Type your off campus email address
- Save the file.