- Change Password
Type passwd, and answer the system prompts for old
password, new password, and verification of new password.
- Help
-
help on a certain subject: man -k subject
-
help on a certain command: man command
-
online information: info
- Account Information
- To check quota: quota -v
- To check print credits: ljstat
- Files
The characters ? and * are used for pattern matching. A
? matches any single character,
and a * matches an arbitrary
number of characters.
Creating
Removing/Renaming/Moving/Copying
-
remove file: rm filename
-
rename file: mv filename newname
-
move file to another directory: mv filename
dirname
-
copy file to another filename: cp filename
newfile
-
copy file to another directory: cp filename
dirname
Listing
-
list file(s): ls filename(s)
-
list files sorted by time of last modification:
ls -t filenames
- Directories
Like filenames, directories use ?
and * as pattern matching
characters (see Files). The current directory and parent directory,
are named . and .. respectively.
Creating/Traversing
-
create/make a directory: mkdir dirname
-
change directory to home directory: cd
-
change directory to parent directory: cd ..
-
change directory to another directory: cd
dirname
-
print working directory: pwd
Removing/Renaming/Moving/Copying
-
remove empty directory: rmdir dirname
-
remove directory and contents: rm -r dirname
-
rename directory, or move directory to another directory:
mv dirname newdir
-
copy directory and contents to another directory:
cp -r dirname dir
Listing
-
list current directory contents: ls
-
list directory contents: ls dirname
-
list directory contents sorted by time of last modification:
ls -t dirname
- I/O Redirection
The standard input/output/error of a command, normally associated with the
terminal, may be redirected by appending one the following to the command
line:
-
open file as standard input: < filename
-
open file as standard output: >
filename
-
open file as standard output and standard error:
>& filename
-
append standard output to file: >>
filename
-
append standard output and standard error to file:
>>& filename
-
pipe standard output of command1 to standard input of command2:
cmd1 | cmd2
- Editing
-
create/edit file - jove editor: jove
filename
-
create/edit file - visual editor: vi
filename
-
create/edit file - emacs editor: emacs
filename
-
create/edit file - line editor: ex
filename
- Printing
-
print text file on screen: more
filename
-
print text file on screen: less
filename
-
print text file on laser printer: lw
-Pprintername filename
-
print tex document on laser printer: lw -d
-Pprintername filename
-
print postscript document on laser printer: lw
-ps -Pprintername filename
-
check laser printer queue: lwq
-Pprintername
-
remove printjob from laser print queue: lwrm
-Pprintername jobnumber
- Formatting Documents
-
format a tex document: tex filename
-
format a latex document: latex filename
TEX and laTEX files must have .tex as
a filename extension. TEX and laTEX produce
files with .dvi as a filename extension.
To view a .dvi file: xdvi filename
- Electronic Mail
-
read mail: pine
-
Shortcut: at $prompt, to send mail to a address: pine address
-
Shortcut: at $prompt, to send mail to multiple addresses:
pine address1 address2 address3
-
mail a file to some address:
mail address < file
- News
-
read/post news: tin
-
post news: Pnews
- Languages and Compilers
-
compile C lanuage source file: gcc
filename
-
compile C++ lanuage source file: g++
filename
-
compile java lanuage source file: javac
filename
-
run java file on java virtual machine: java
filename
-
compile Fortarn lanuage source file: f77
filename
-
compile Pascal lanuage source file: pc
filename
-
run Common Lisp interpreter: cl
-
Awk pattern scanning and processing language:
gawk -f programfile
C, Fortran, Java and Pascal source files must have the extensions
.c, .f, .java and .p respectively.
- Commands
-
calulator: bc
-
monthly calendar: cal month year
-
yearly calendar: cal year
-
current date and time: date
-
show differences between two files: diff
file1 file2
-
display information about a user: finger
username
-
file transfers to/from a remote host: ftp
hostname
-
find lines matching a specific string:
grep string file(s)
-
find lines not matching a specific string:
grep -v string file(s)
-
show the first num lines of filename: head
-num filename
-
view online manual pages: man
command
-
login to a remote unix host: rlogin
hostname
-
execute a command on a remote unix host: rsh
host command
-
spelling checker: spell filename
-
show the last num lines of filename: tail
-num filename
-
talk to another user: talk
username
-
connect to a remote host: telnet
hostname
-
display information on the top CPU processes:
top
-
show how long the system has been up: uptime
-
display number of lines, words, and character in a file:
wc filename
-
show who is on the system: who