linuxsnippets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linuxsnippets [2006/11/08 03:12] – 75.42.252.241 | linuxsnippets [2012/08/15 16:21] (current) – ssh tunnel 91.64.56.15 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Linux Snippets ====== | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Disable firewall logging to console ===== | ||
| + | |||
| + | Edit ''/ | ||
| + | |||
| + | < | ||
| + | KLOGD=" | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== mysqldump Options ===== | ||
| + | |||
| + | #> mysqldump -u user -p --complete-insert --add-drop-table --databases db1 db2 | ||
| + | |||
| + | other options | ||
| + | |||
| + | < | ||
| + | --no-data | ||
| + | --no-create-info | ||
| + | --no-create-db | ||
| + | </ | ||
| + | |||
| + | ===== Export local webserver to public server ===== | ||
| + | |||
| + | ssh andi@gaz.splitbrain.org -R *: | ||
| + | ===== Show humanreadable date from timestamp ===== | ||
| + | |||
| + | $> perl -e 'print scalar(localtime(1098189697))." | ||
| + | |||
| + | ===== Swapfile ===== | ||
| + | |||
| + | Sometimes you need some swap space. Here is how to add some to a running system: | ||
| + | |||
| + | # dd if=/ | ||
| + | # mkswap /extraswap | ||
| + | # swapon /extraswap | ||
| + | |||
| + | ===== Fedora yum Setup ===== | ||
| + | |||
| + | Import GPG keys for installing via yum | ||
| + | |||
| + | rpm --import / | ||
| + | |||
| + | ===== UTF-8 Terminal on an latin1 system ===== | ||
| + | |||
| + | Sometimes you need a terminal which can display UTF-8 but your system still uses latin1. Here is what I did: | ||
| + | |||
| + | Install a unicode aware teminal emulator: | ||
| + | |||
| + | #> apt-get install rxvt-unicode | ||
| + | |||
| + | Make sure you have a UTF-8 locale available eg. '' | ||
| + | |||
| + | Add this to your '' | ||
| + | |||
| + | < | ||
| + | alias uterm=' | ||
| + | </ | ||
| + | |||
| + | Now run '' | ||
| + | |||
| + | |||
| + | ===== Find string in various files ===== | ||
| + | < | ||
| + | find . | xargs grep ' | ||
| + | </ | ||
| + | |||
| + | Or if you don't need the flexibility of find: | ||
| + | |||
| + | < | ||
| + | grep -R " | ||
| + | </ | ||
| + | |||
| + | (-R for recursive; the star as a file matching pattern) | ||
