|
1
|
User-level commands and applications
|
|
2
|
System calls and kernel error codes
|
|
3
|
Library calls
|
|
4
|
Device drivers and network protocols
|
|
5
|
Standard file formats
|
|
6
|
Games and demonstrations
|
|
7
|
Miscellaneous files and documents
|
|
8
|
System administration commands
|
|
9
|
Obscure kernel specs and interfaces
|
|
1. Redirect I/O
|
|
2. Replace {} expansion
|
|
3. Replace `~` expansion
|
|
4. Params and variable expansion
|
|
5. Commnad $() substitution
|
|
6. Arithmetic expansion
|
|
7. Process <() substitution
|
|
8. Word splitting (IFS)
|
|
9. File name expansion
|
-q, --quiet |
Turns off Wget's output
|
-B, --base |
Relative links using URL
|
-t, --tries |
Set number of retries
|
-O {file|-} |
Redirect output
|
-T, --timeout |
Network timeout to seconds
|
-d, --date= |
Display time described, not now
|
-s, --set= |
Set time to described ¡
|
%a, %A |
Sun, Sunday
|
%b, %B |
Jan, January
|
%c |
Thu Mar 3 23:05:25 2005
|
%d |
day of month
|
%F |
full date; same as
%Y-%m-%d |
%H, %I |
hour (00..23), hour (01..12)
|
%m |
month (01..12)
|
%M |
minute (00..59)
|
%s |
seconds since epoch
|
%S |
second (00..60)
|
%T |
time; same as
%H:%M:%S |
%Y |
Year
|
-c, --create |
create new
|
-r, --append |
append files
|
-t, --list |
list the contents
|
-u, --update |
only append newer
|
-x, --extract |
extract files
|
-C, --directory= |
change to directory
|
-f, --file= |
use archive file or device
|
-j, --bzip2 |
bzip2
|
-z, --gzip |
gzip
|
-b |
ignore leading blanks
|
-d |
only blanks and alphanumeric
|
-f |
case insensitive
|
-i |
ignore non-printable
|
-M |
compare 3-letter month
|
-h |
human numeric (2K < 1G)
|
-n |
numeric
|
-R |
random short (hash)
|
-r |
reverse result, i. e. descending
|
-k |
Key start at pos (origin 1)
|
-u |
Delete duplicates
|
-z |
Zero terminated lines
|
-p prompt |
Shows prompt text
|
-r |
One line only (no backslash)
|
-s |
Silent. No echo.
|
-t |
Timeout in seconds
|
-u fd |
Read from file descriptor
|
-n |
Number of chars
|
-d |
Set delimiter
|
-a |
All files (not just dirs)
|
--files0-from= |
Null separated. '-' is stdin
|
-h |
Human readable
|
--max-depth |
'0' => just given argument
|
|
~change
|
Change attributes
|
|
~create
|
Initialize for use by LVM.
|
|
~display
|
Display attributes
|
|
~resize
|
Resize a LVM ~
|
|
~extend -L
|
Extends ~ by [+]bytes
|
|
~scan
|
Shows all LVM ~
|
mkfs -t ext3 part / resize2fs lv_name
-e |
Expire date
|
-d |
Delete password
|
-l, -u |
Lock or unlock
|
-n |
Min days between changes
|
-x |
Max days of validity
|
-w |
Warn days before expire
|
-i |
Deactivate days
|
-S |
Show status of account
|
|
type
|
Shows type of the program or command given as first paramether
|
|
stty
|
Change and print terminal line settings
|
|
chpasswd
|
Reads from stdin pairs of type USER:PASSWORD
|
|
id
|
Returns user info
uid=1000(name) gid=1000(name). Exit code is set. |
|
bc
|
Math expresions from stdin. Tip: use
scale=n; for div precision |
|
seq
|
[FISR [INCREMENT]] LAST
|
|
cat
|
who
|
whoami
|
head
|
|
echo
|
cp
|
mv
|
ln
|
|
mkdir
|
rm
|
rmdir
|
ln -s
|
|
cat
|
less
|
more
|
bg
|
|
tee
|
exec
|
jobs
|
fg
|
|
env
|
printenv
|
readonly
|
export
|
|
local
|
$(())
|
pwd
|
ls
|
|
paste
|
uniq
|
wc -l
|
fmt
|
|
join
|
split
|
tac
|
rev
|
|
nl
|
expand
|
od
|
chown
|
|
chgrp
|
chmod
|
passwd
|
useradd
|
|
userdel
|
usermod
|
groupadd
|
|
-maxdepth |
Descend at most levels
|
-mindepth |
No actions at less than levels
|
+n, -n, n |
greater, less, exactly n
|
-amin n |
Last accessed n minutes ago
|
-atime n |
Last accessed n days ago
|
-cmin, -ctime n |
Last changed
|
-mmin, -mtime n |
Last modified
|
-empty |
Empty regular or directory
|
-executable |
File or directory +x
|
-group gname |
File belongs to group
|
-gid n |
Numeric group ID
|
-user uname |
File belongs to user
|
-uid n |
Numeric user ID
|
-name |
Base name matches pattern
|
-iname |
-name, but case insensitive
|
-path |
File name matches pattern
|
-perm mode |
Permission bits are...
|
g=u, +g=u, /g=u |
exactly, at least, any of
|
-size n[cwbkMG] |
File uses space
|
-type [bcdpfls] |
File is of type
|
-readable |
With read permission
|
-writable |
With write permission
|
-delete |
Delete files
|
-exec cmd; |
Execute for every file (multiple {})
|
-exec cmd+ |
Execute appending file (single {})
|
-fprint |
Print into file
|
-ok cmd ; |
Like -exec, but ask user first
|
-print0 |
Null seperated
|
-printf |
Print with format
|
-b |
Select bytes
|
-c |
Select characters
|
-f |
Select fields
|
-d |
Field delimiter
|
--complement |
Complement selector
|
N, N-, N-M, -M |
Specifies selector
|
-c |
Number of requests
|
-c K |
Bytes to print
|
-n K |
Lines to print
|
K |
May have sufix (b, kB, K...)
|
+K |
Print from...
|
-e |
All process
|
-a |
All except leaders and no-terminal
|
-g |
By group
|
-p |
By pid
|
-t |
By tty
|
-u |
By user
|
-F |
Full output format
|
-o |
Custom output format
|
-l |
Number of lines
|
-w |
Number of words
|
-c |
Number of bytes
|
-L |
Length of longest line
|
|
$0
|
Program name
|
|
$1-$9
|
Normal params
|
|
${10}, ${11}...
|
More params
|
|
$#
|
Number of params
|
|
$*
|
List of params
|
|
$@
|
List of params (*)
|
|
$?
|
Exit status code
|
|
$$
|
Process id
|
|
$!
|
Last child process id
|
if *cond*; then
[elif *cond*; then]
else
fi
IF=$' \t\n'
while *cond*
do
[break | continue]
done
until *cond*
for i in list
do
done
|
'
|
"
|
\
|
&
|
|
<
|
>
|
<<
|
>>
|
|
*
|
|
|
?
|
[ ]
|
|
[!^ ]
|
$
|
;
|
`
|
|
.
|
[ ]
|
[^ ]
|
^
|
|
$
|
*
|
( )
|
\
|
|
{n,m}
|
+
|
?
|
\w
|
|
\s
|
\b
|
\B
|
|
-e |
Specifies the pattern
|
-f |
Get patterns from file lines
|
-i |
Case insensitive
|
-v |
Select non-matching lines
|
-w |
Match whole words only
|
-c |
Show (non-)matching lines count
|
-q |
Quiet (exit 0 when match)
|
( EXPRESSION ) |
is true
|
! EXPRESSION |
is false
|
EXP -a EXP |
Logic AND
|
EXP -o EXP |
Logic OR
|
-n STRING |
Not null string
|
-z STRING |
Null string
|
STR = STR |
Strings are equal
|
STR != STR |
Strings are different
|
INT -eq INT |
Numbers are equal
|
INT -ne INT |
Numbers are different
|
-ge, -gt |
>=, >
|
-le, -lt |
<=, <
|
FILE1 -ef FILE2 |
Same device and inode
|
FILE1 -nt FILE2 |
F1 is newer than F2
|
FILE1 -ot FILE2 |
F1 is older than F2
|
-b, -c, -d, -f |
block, chars, dir, regular
|
-e, -r, -w, -x |
exists, read, write, exec
|
-t FD |
File descriptor FD is opened
|
-c |
Specifies output format
|
%a, %A |
Access rights octal, human
|
%b, %s |
Size in block, bytes
|
%F |
File type
|
%g, %G |
Group owner id, name
|
%h |
Number of names (links)
|
%i |
Inode number
|
%n, $N |
File name, quoted
|
%t, %T |
Device major, minor
|
%u, %U |
User owner id, name
|
%x, %X |
Last access time, epoch
|
%y, %Y |
Last modified time, epoch
|
%z, %Z |
Last changed time, epoch
|
|
-c
|
Use complement of SET1
|
|
-d
|
delete chars from SET1
|
-e cmd |
Multi-command mode
|
= |
Current line number
|
|
`a`
|
Append text
|
|
`i`
|
Insert text
|
|
`c`
|
Replace lines
|
d |
Delete pattern
|
s |
Replace pattern
|
g |
Apply globally (more than once)
|
[ line_n [ ,line_n ] ] commnad [ parameters ]! line_n command [parameters][ line_n, $ ] commnad [ parameters ]
|
pid
|
state
|
user
|
|
ruser
|
group
|
rgroup
|
|
pid
|
ppid
|
pgid
|
|
pcpu
|
nice
|
etime
|
|
time
|
tty
|
comm
|
|
args
|
||
-i |
permite el uso de {}
|
-r |
No run if empty
|
--null, -0 |
Null terminated args
|
-d |
Delimiter
|
-n |
Max args
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.