man 7 hier
/bin
/usr
/boot
/dev
/etc
/etc/rc.d/
/etc/X11
/home
/lib, /lib64
/lib
/lib64
/sbin
/media /mnt
/media
/mnt
/opt
/proc
man 5 proc
/root
/run
/srv
/sys
/tmp
/
/usr/bin User binaries, not needed at boot.
/usr/bin
/usr/include Standard include libraries (C, C++)
/usr/include
/usr/lib* Libraries (for binaries in /usr/bin, /usr/sbin)
/usr/lib*
/usr/sbin
/usr/local/ A tertiary hierarchy for local system additions
/usr/local/
/usr/sbin Non-essential system binaries (e.g. daemons)
/usr/share Shared data
/usr/share
/usr/src Source code (e.g. kernel source)
/usr/src
/usr/X11R6 X windows (Version 11, release 6)
/usr/X11R6
/var
/var/cache Application cache data.
/var/cache
/var/lib State information generated by programs such as databases and package managers
/var/lib
/var/lock Lock files
/var/lock
/var/log log files (syslogd, klogd, httpd, other daemons)
/var/log
/var/log/packages Slackware package database
/var/log/packages
/var/log/setup Slackware setup/configuration scripts
/var/log/setup
/var/mail User mailboxes
/var/mail
/var/spool Spool directories for tasks waiting to be processed (cron, mail, print files) (depreciates /var/spool/mail)
/var/spool
/var/tmp Temporary files to be preserved across reboots
/var/tmp
> find <path> [<expressions...>] [-ls] [-exec <cmd> {} \;]
Expressions: -a = AND expr1 -a expr2 - both must be true -o = OR expr1 -o expr2 - only one need be true -ls List files using a long ls like listing -exec cmd {} \; Execute cmd for each file placing the filename where {} is located. Command is terminated with an escaped semicolon (\;) ` True if: -name pattern Filename matches shell pattern -regex pattern Filename matches regex pattern -iname / -iregex Like -name / -regex but ignore case -mtime n File was modified n x 24 hours ago -perm mode Files permissions are mode -user user File is owned by user -group group File is owned by group
-a
-o
-ls
-exec
{} \;
{}
\;
-name
-regex
-iname
-iregex
-mtime
-perm
-user
-group
> locate <name>
> locate <
>
> tree
man 7 regex
<branch> ['|' <branch> ['|' <branch> ...]]
<
> ['|' <
]]
<piece>[<piece>[<piece>...]]
<atom>'*'
>'*'
Matches 0 or more of the atom
<atom>'+'
>'+'
Matches 1 or more of the atom
<atom>'?'
>'?'
Matches 0 or 1 of the atom
<atom><bound>
><
Matches bound # of atoms
'{'<num>'}'
'{'<
>'}'
Matches exactly num items
'{'<min>','[<max>]}'
>','[<
>]}'
Matches min or more items, up to max if specified.
^
$
.
[...]
(<regex>)
(<
>)
Matches the regular expression regex as an atom.
()
^foo
foo$
^foo$
^(foo|bar)
cs469[0-9]{2}
[0-9]{3}-[0-9]{4}
([a-f0-9]{2}:){5}[a-f0-9]{2}
(0[xX])?[0-9a-fA-F]+
'.'|'\\.'|'\\[0-7]{1,3}'
"[^"]*"
((1?[0-9]{1,2}|2[0-4][0-9]|25[0-5]).){3}(1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])
> grep patterns [files...]
> grep
[
]
> egrep ...
grep -E
> fgrep ...
grep -F
> sed
-n
-e
> man pcresyntax
> man pcrepattern
> pcregrep