Sections of man pages
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 |
Substitution order
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 |
wget(1)
|
Turns off Wget's output |
|
Relative links using URL |
|
Set number of retries |
|
Redirect output |
|
Network timeout to seconds |
date(1)
|
Display time described, not now |
|
Set time to described ¡ |
|
Sun, Sunday |
|
Jan, January |
|
Thu Mar 3 23:05:25 2005 |
|
day of month |
|
full date; same as %Y-%m-%d
|
|
hour (00..23), hour (01..12) |
|
month (01..12) |
|
minute (00..59) |
|
seconds since epoch |
|
second (00..60) |
|
|
|
Year |
tar(1)
|
create new |
|
append files |
|
list the contents |
|
only append newer |
|
extract files |
|
change to directory |
|
use archive file or device |
|
bzip2 |
|
gzip |
sort(1)
|
ignore leading blanks |
|
only blanks and alphanumeric |
|
case insensitive |
|
ignore non-printable |
|
compare 3-letter month |
|
human numeric (2K < 1G) |
|
numeric |
|
random short (hash) |
|
reverse result, i. e. descending |
|
Key start at pos (origin 1) |
|
Delete duplicates |
|
Zero terminated lines |
read(1)
|
Shows prompt text |
|
One line only (no backslash) |
|
Silent. No echo. |
|
Timeout in seconds |
|
Read from file descriptor |
|
Number of chars |
|
Set delimiter |
du(1)
|
All files (not just dirs) |
|
Null separated. '-' is stdin |
|
Human readable |
|
'0' => just given argument |
lvm(8) - pv / vg / lv
~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 ~ |
Tips: mkfs -t ext3 part
/ resize2fs lv_name
/etc/passwd
login:passwd:UID:GID:info:home:shell |
/etc/shadow
login:passwd:lastchange:mintime:maxtime:warntime:detime:lcktime: |
passwd(1)
|
Expire date |
|
Delete password |
|
Lock or unlock |
|
Min days between changes |
|
Max days of validity |
|
Warn days before expire |
|
Deactivate days |
|
Show status of account |
/etc/group
name:passwd:GID:login-list |
|
|
Shell and tools (I)
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 |
Shell and tools (II)
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 |
find(1) [OPTIONS]
|
Descend at most levels |
|
No actions at less than levels |
find(1) [TESTS]
|
greater, less, exactly n |
|
Last accessed n minutes ago |
|
Last accessed n days ago |
|
Last changed |
|
Last modified |
|
Empty regular or directory |
|
File or directory +x |
|
File belongs to group |
|
Numeric group ID |
|
File belongs to user |
|
Numeric user ID |
|
Base name matches pattern |
|
-name, but case insensitive |
|
File name matches pattern |
|
Permission bits are... |
|
exactly, at least, any of |
|
File uses space |
|
File is of type |
|
With read permission |
|
With write permission |
find(1) [ACTIONS]
|
Delete files |
|
Execute for every file (multiple {}) |
|
Execute appending file (single {}) |
|
Print into file |
|
Like -exec, but ask user first |
|
Null seperated |
|
Print with format |
cut(1)
|
Select bytes |
|
Select characters |
|
Select fields |
|
Field delimiter |
|
Complement selector |
|
Specifies selector |
tail(1)
|
Bytes to print |
|
Lines to print |
|
May have sufix (b, kB, K...) |
|
Print from... |
ps(1)
|
All process |
|
All except leaders and no-terminal |
|
By group |
|
By pid |
|
By tty |
|
By user |
|
Full output format |
|
Custom output format |
wc(1)
|
Number of lines |
|
Number of words |
|
Number of bytes |
|
Length of longest line |
Predefined variables
$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 |
(*) Use "$@" when reading in for-loop
/etc/sudoers
user ALL=ALL
%group ALL=NOPASSWD:/usr/bin/true |
|
|
Shell and tools (III)
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
|
Shell special characters
' |
" |
\ |
& |
< |
> |
<< |
>> |
* |
| |
? |
[ ] |
[!^ ] |
$ |
; |
` |
Between " " only $, `cmd` and \
Extended regex
. |
[ ] |
[^ ] |
^ |
$ |
* |
( ) |
\ |
{n,m} |
+ |
? |
\w |
\s |
\b |
\B |
egrep(1)
|
Specifies the pattern |
|
Get patterns from file lines |
|
Case insensitive |
|
Select non-matching lines |
|
Match whole words only |
|
Show (non-)matching lines count |
|
Quiet (exit 0 when match) |
test(1)
|
is true |
|
is false |
|
Logic AND |
|
Logic OR |
|
Not null string |
|
Null string |
|
Strings are equal |
|
Strings are different |
|
Numbers are equal |
|
Numbers are different |
|
>=, > |
|
<=, < |
|
Same device and inode |
|
F1 is newer than F2 |
|
F1 is older than F2 |
|
block, chars, dir, regular |
|
exists, read, write, exec |
|
File descriptor FD is opened |
stat(1)
|
Specifies output format |
|
Access rights octal, human |
|
Size in block, bytes |
|
File type |
|
Group owner id, name |
|
Number of names (links) |
|
Inode number |
|
File name, quoted |
|
Device major, minor |
|
User owner id, name |
|
Last access time, epoch |
|
Last modified time, epoch |
|
Last changed time, epoch |
tr(1)
-c |
Use complement of SET1 |
-d |
delete chars from SET1 |
Translation occurs if -d is not given and both SET1 and SET2 appear. SET2 is extended to length of SET1 by repeating its last character as necessary. Excess characters of SET2 are ignored.
sed(1)
|
Multi-command mode |
|
Current line number |
`a` |
Append text |
`i` |
Insert text |
`c` |
Replace lines |
|
Delete pattern |
|
Replace pattern |
|
Apply globally (more than once) |
[ line_n [ ,line_n ] ] commnad [ parameters ]
! line_n command [parameters]
[ line_n, $ ] commnad [ parameters ]
ps(1) [FORMAT]
pid |
state |
user |
ruser |
group |
rgroup |
pid |
ppid |
pgid |
pcpu |
nice |
etime |
time |
tty |
comm |
args |
xargs(1)
|
permite el uso de {} |
|
No run if empty |
|
Null terminated args |
|
Delimiter |
|
Max args |
|
Created By
https://www.xdevelop.ml
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets