Below you will find pages that utilize the taxonomy term “Tip”
March 2, 2010
Perl : Counting occurences of IP addresses in Apache logs
This Perl one-liner is intended to print the 10 most frequent client IP addresses in an Apache log file. It can easily be recycled to count anything, though.
November 29, 2007
Unix : the “script” command
The script command is a must for any unix sysadmin.
Once invoked, it will faithfully write anything you typed as well as any output generated in your terminal into a file of your choice (defaults to “typescript”).
This is great when you want to document everything you did on a specific server, for example.
spaghetti:~$ script<br /> Script started, file is typescript<br /> spaghetti:~$<br />
When launched, you don’t see anything, but everything displayed goes to a file as well as the terminal.
August 16, 2007
Solaris 10: On which CD is that XYZ package ?
If you want to know on which CD is a package, without :
- Mounting CD
- Searching
- Unmounting
- Swear and
- Go back to 1
Then you can :
- Mount CD #1 (mount -F hsfs /dev/dsk/
/mnt or, if you have automount cd /cdrom/cdrom0 or something like that) - Go in the Solaris_10/Product directory of the CD
- Do grep -l
.virtual_packagetoc_* which will output the .virtual_packagetoc_N where N is the number of the CD holding that package.
Exemple :