Appendix


PREVIOUS
Emacs

Contents:


 

NOTE: square brackets ([]) around an argument mean that it is optional. Angle brackets (<>) mean that it is necessary.

File System Commands

Command

Description

Common Options

chmod <level> <file> Changes the permissions of file to level. See Linux Hints below or man page for description of levels  
cp [options] <src> <dest> Copies src to dest. -r - recursive (for directories)
du [options] [directory] Lists size of files in directory. If no directory is specified, lists current dir.  
ls [options] [directory] Lists contents of directory. If no dir is specified, lists current dir. -l - "long" lists owner, permissions, size, last modified
-a - "all" includes files beginning with '.' (Options can be combined, like "ls -al"
mkdir <dir> Creates dir.  
mv <src> <dest> Renames src to dest.  
rm [options] <file> Deletes file. -r - recursive (for directories)
rmdir <dir> Deletes dir, if it is empty.  
touch <file> If file does not exist, creates an empty file of that name. If file does exist, does not affect it.  

 

Utilities

Command Description Common Options
finger [name or account or @machine] If no argument is given, lists users of your machine. If a name or account is given (or piece thereof) lists information for any accounts matching string. If @machine is given, lists all users of machine.  
grep <pattern> <file> Displays all lines in file containing pattern. (Surround multi-word patterns with quotation marks.) -i - ignore case
-r - recurse into directories (without this, only looks at files in current dir)
-v - invert (display lines not matching the pattern. useful if you are chaining multiple searches together with '|' (See Linux Hints below)
less <file> Displays file in a shell. Allows you to scroll backwards and forwards through file, and to search by pressing '/.'  
lpr [options] <file> Prints file. Defaults to cis dispatch window. -P<printer> - specify printer
lpq [options] Lists the print queue. Defaults to cis dispatch printer. -P<printer> - specify printer
lw Displays text diagram of lab, with the name of everyone logged in. -f - show full names (default)
-n - show logins
-t - show amount of time each user has been logged in
-i - show how long each user has been idle
man <Linux command> Displays the man (manual) page for the specified command. Good way to move beyond this Appendix, as we are eliding all but the most common options for most commands.  
more <file> Displays file in shell. Only allows forward scrolling. (more is less than less =] )  
passwd Changes password.  
pwd Prints the full path or your current working directory.  
qwaitlist Gives the status of the waitlist, if there is one, including how many people will be kicked off before you.  
tar [options] <outputfile> <files or dir> Creates a type of archive ("Tape Archive") of files and names it outputfile. cvf - to create an archive (tar cvf package.tar *.java)

xvf - to extract from archive (tar xvf package.tar)

top Real-time display of all processes active on your computer. Useful if your computer seems to be going really slow. (Sometimes, a user won't properly exit a program before logging off, and it becomes a "zombie" process, just eating up the processor. If you top and see a process that you don't own taking up a large percentage of your processor, talk to the consultant.)  
unzip [options] <archive> Extracts files from a zip archive. -l - just list files, don't extract them
xlock [options] Password protected screen saver. Use this EVERY time you leave your computer.  
xv [file] Viewer for .jpg (.jpeg), .tiff, .gmp, and .bmp images.  
zip [options] <outputfile> <files or dir> Like tar, but creates a .zip compressed file. -r - recursive (for directories)
zwrite <login> Sends a sort of instant message to the user specified.  

 

Programs

Command Description
acroread [file] Reader for .pdf files.
gimp [file] Pretty powerful photo editor.
mozilla [url or file (file must be preceded by "file://")] Web browser.
pico [file] Simple, shell-based text editor.
pine Shell-based mail client.
xemacs [file] Text editor.
xterm Shell.

 

XEmacs Keyboard Shortcuts

Command Shortcut
Dynamic Expansion M-/
Exit XEmacs C-x C-c
Find and Replace M-%
Goto Line M-g
Goto Buffer C-x b
Open C-x C-f
Save (current buffer) C-x C-s
Save Some Buffers C-x s
Search (forward, press over and over to find next) C-s
Search (backward, press over and over to find next) C-r
Undo C-x u
Un-split (keep this) C-x 1
Un-split (keep other) C-x 0

 

Desktop Menus

Root Menu (left mouse button):

Window List (middle mouse button)

Special Menu (right mouse button):

 

Linux Hints


PREVIOUS
Emacs