![]()
| ||
UNIX and X-windows Quick Reference
These instructions are for alphanumeric terminals or terminal windows (via Xwin-32, ssh/slogin or telnet). Commands are case sensitive. Parts of commands shown inside of square brackets [ ] are optional. Parts of commands inside of angle brackets < > should be replaced with your relevent file or directory names.
- To use online help (manuals):
man <command> or apropos <keyword>
[e.g., man ls prints the manual pages for the "ls" command to your screen. apropos print would print the command names related to printing.]- To check current directory location (print working directory):
pwd- To change your working directory (change directory):
cd
(changes directory to your home directory)
cd <directoryname>
(changes directory to the named directory)- For a shortcut to refer to your home directory: ~
[e.g., cd ~/mail would change directory to your mail folder in your home directory.]
- A shortcut to refer to the directory one level above your current directory: ..
[e.g., cd .. would change your working directory to one level back.]- To list files in the current directory:
ls- To determine size of file in bytes or view access permissions:
ls -l [filename]- File access changes:
- Add (+) execute permissions (x) for the owner/user (u) of the file:
chmod u+x <filename>- Add (+) read permissions (r) for everyone (a) for all files (*) in the current directory:
chmod a+r *- Remove (-) world/other (o) read permissions (r) for a file:
chmod o-r <filename>- Add (+) group (g) write permissions (w) for a file:
chmod g+w <filename>- To delete (remove) a file:
rm <filename>- To copy a file:
cp <existingfile> <newfile>- To view contents of a text file:
more <filename>
(space bar advances a page, RETURN advances a line)- To determine space used by files in current directory and subdirectories in Kbytes:
du -sk
Don't forget to logout! If you are using a Xwin-32 session, logout (type "exit" or use "CTRL-d") and then close the Xwin-32 window.
Questions and comments -- open a ticket at the Mines Help Center
Thursday, 13-Sep-2007 09:48:16 MDT