beckert@phys.ethz.ch
http://noone.org/abe/
Prompt | Command | Options | Parameters |
> |
mv |
-v -i |
file1 file2 |
$ |
cp |
--recursive --preserve |
file1 file2 directory |
# |
rm |
-rf |
directory |
Programs on BSD and traditional Unices often only have one-character options which can be combined
GNU programme often have short (one character, starting with "-") and long variants (word, starting with "--") of its options.
Short | Long | Meaning |
---|---|---|
-h |
--help |
Help |
--usage |
Detailed helo | |
-v , -V |
--version |
Show software version |
-v |
--verbose |
Give (verbose) output |
-f |
--force |
Enforce execution |
-i |
--interactive |
Ask before overwriting or destroying files |
-r , -R |
--recursive |
Recursively go through directory tree |
-p |
--preserve |
Keep file metadata (user, permissions, last modification time, etc.) where possible |
-d3 , -d 3 |
--debug=3 |
Debug level 3 |
pwd
: print (current) working directoryls
: listls -a
: list all (includes hidden files)ls -l
: list in long format (i.e. with details)ls -d directory_name
: list directory itself
instead of its contentsls -F
: list with classification (*/@
)mkdir directory_name
: make directorymkdir -p directory_name/sub_directory_name
make directory and parentscd directory_name
: change directorycd
without parameter: change to home directorycd -
: change to previous directorymv
: move — Moving and renamingcp
: copy — Copyingmv old new
, cp file copy
mv file1 file2 dir
, cp file1 file2 dir
mv *.txt dir
, cp *.txt dir
mv -v …
, cp -v …
: verbose
— say what the command is currently doingmv -i …
, cp -i …
: interactive,
ask before overwritingcp -r …
: recursive — also copy
subdirectoriescp -p …
: preserve — Also copy
permissions and last modification timerm file
: Remove "file"rm *.txt
: Remove all files with suffix "txt"rmdir directory
: Remove empty directoryrm -r directory
: Recursively remove a directory
tree including all its files and subdirectoriesrm -i *.txt
: Ask before removing for each filerm -f *.txt
: Don't ask even before removing
write-protected filesman program_name
(Help: man man
)info program_name
(Help: info info
; Overview over all available
documentation: info
without parameter)Input | Meaning |
---|---|
/text<Enter> |
Search forward for "text" |
?text<Enter> |
Search backward for "text" |
n |
Next hit in current search direction |
<Cursor down> ,
<Enter> , <Ctrl-n> ,
j |
Scroll one line down |
<Cursor up> , <Ctrl-p> ,
k |
Scroll one line up |
<Page down> , <Blank> |
Scroll one page down |
<Page up> , b |
Scroll one page back |
<Home> , g |
Jump to the beginning |
<End> , <Shift-g> |
Jump to the end |
q |
Quit |
Problem: A so called "man page" easily can contain over 5000 lines and often is no easy beside reading but a reference.