From LedHed's Wiki
Revision as of 21:48, 19 May 2008 by Ledhed (Talk | contribs)

Jump to: navigation, search

Tips -N- Tricks

Search command history

grep -i 'SearchStringHere' ~/.bash_history

View Log Continuously

tail -f /path/to/log/filename

or

Filter a continuous log for a specific entry

tail -f /path/to/log/filename | grep -i 'FilterStringHere'


Dump a .conf file to a new file without the comments (#)

grep -v '#' file.conf > newfile.conf

Disable/Enable Swap

To disable all swap space in Linux use this command:

swapoff -a

To re-enable it use this command:

swapon -a