UNIX Help
This page is a quick reference for UNIX. If you think something else should be added to the page, let me know.
Managing Files
pwd
present working directory
cd [dir]
change directory
Special names for directories:
-
.
the current directory ..
the parent directory~
home directory
ls
list files in the directory
Useful options:
- l: long format
- h: human-readable
- t: time order
- r: reverse order
cp [srcfile] [destfile]
copy a file (srcfile) into another file/location (destfile)
mv [srcfile] [destfile]
move a file (srcfile) into another file/location (destfile)
Running programs in the background
cmd [args] &
To run a command cmd [args]
in the background,
follow the full command (including arguments) with an "&
"
For example: emacs &
. Emacs opens and the
terminal is now available to run other commands.
If you already started to run the program in the foreground,
type 'Control-Z', which suspends the running program and gives you
your prompt back. Then, type
bg
, which puts the suspended program in the
background. Now, you can use emacs.