[[TOC]]
Sometimes remembering exact syntax or options of a command or tool. This is an effort to compile that information into central repository. For example:
- You know that
find
can execute commmands on found files, but forgot the syntax?
Was it-exec <command> {};
or-exec <command> {}\;
?
Was there a space? - Or that handy
rsync
option? - How did I suppose to redirect both output and error into?
2&1>
or2>&1
?
find . -type f -[i]name '*.txt' -exec grep -q 'hello' {} ';'
-type <letter>
. letter
can be:
b
-> blockf
-> regular filed
-> directoryl
-> symbolic link
-name <pattern>
-> file name(not directory) in shell patern format to match
-iname
-> insensitive name
-exec <command> [{}] ';|+'
$ pacman -Ql pacman|grep /usr/bin/
pacman /usr/bin/makepkg
pacman /usr/bin/makepkg-template
pacman /usr/bin/pacman
pacman /usr/bin/pacman-conf
pacman /usr/bin/pacman-db-upgrade
pacman /usr/bin/pacman-key
pacman /usr/bin/repo-add
pacman /usr/bin/repo-elephant
pacman /usr/bin/repo-remove
pacman /usr/bin/testpkg
pacman /usr/bin/vercmp