From LedHed's Wiki
Line 33: | Line 33: | ||
Common Sqitches: | Common Sqitches: | ||
− | -i Install | + | -i Install<br> |
− | -U Upgrade | + | -U Upgrade<br> |
− | -v verbose | + | -v verbose<br> |
− | -h Display Hash mark progress bar | + | -h Display Hash mark progress bar<br> |
− | -e erase | + | -e erase<br> |
− | --force forces an erase or upgrade | + | --force forces an erase or upgrade<br> |
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 17:37, 22 May 2008
Tips -N- Tricks
Contents
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
RPM's
RedHat based distributions use RPM's short for Redhat Package Manager. To view a list of installed RPMS:
rpm -qa
To look for a specific installed package:
rpm -qa | grep 'package_name'
To view the contents of a RPM
rpm -qpil /path/to/package.rpm
Common Sqitches:
-i Install
-U Upgrade
-v verbose
-h Display Hash mark progress bar
-e erase
--force forces an erase or upgrade