Miscellenous Commands

To see what's in an installed package,
   rpm -ql mysql-server | perl -pe 's=(.*)/.*=$1=' | uniq -c | sort -n
rpm -ql will list all files owned by this installed package. Perl's -p puts this structure around your code
   LINE:
    while (<>) {
        ...             # your program goes here
    }
The Perl code is strips off the file name, printing out just the directory names. The uniq -c to count how many are in each unique directory, then sorting it with the biggest number at the bottom.
A typical tcpdump command when ssh'd into a machine, might be
   tcpdump -l not port 22
or tcpdump -l not port 22 and not port 53 and not arp
The -l (el, not one) option says to print lines right away, else it'll buffer them.



This page was last updated: Wednesday, 04-Oct-2006 11:51:11 Pacific Daylight Time