Check These Out
Command line to get which PID is opening a socket on IP and PORT.
Only useful under Solaris.
populate the auth.hosts file with a list of IP addresses that are authorized to be in use and when you run this command it will return the addresses that are pingable and not in the authorized list.
Can be combined with the "Command line Twitter" command to tweet unauthorized access.
The trick here is to use the brackets [ ] around any one of the characters of the grep string. This uses the fact that [?] is a character class of one letter and will be removed when parsed by the shell. This is useful when you want to parse the output of grep or use the return value in an if-statement without having its own process causing it to erroneously return TRUE.
An easy alias for opening a manpage, nicely HTML formatted, in your set internet browser.
If you get a "command exited with status 3" error you need to install groff.
Shows all block devices in a tree with descruptions of what they are.
From Gentoo Forum, greetings to rudregues & steveL.
Useful if you don't have at hand the ability to automatically create a booklet, but still want to.
F is the number of pages to print. It *must* be a multiple of 4; append extra blank pages if needed.
In evince, these are the steps to print it, adapted from https://help.gnome.org/users/evince/stable/duplex-npage.html.en :
1) Click File ▸ Print.
2) Choose the General tab.
Under Range, choose Pages.
Type the numbers of the pages in this order (this is what this one-liner does for you):
n, 1, 2, n-1, n-2, 3, 4, n-3, n-4, 5, 6, n-5, n-6, 7, 8, n-7, n-8, 9, 10, n-9, n-10, 11, 12, n-11...
...until you have typed n-number of pages.
3) Choose the Page Setup tab.
- Assuming a duplex printer:
Under Layout, in the Two-side menu, select Short Edge (Flip).
- If you can only print on one side, you have to print twice, one for the odd pages and one for the even pages.
In the Pages per side option, select 2.
In the Page ordering menu, select Left to right.
4) Click Print.
Place this in your .bash_profile and you can use it two different ways. If you issue 'h' on its own, then it acts like the history command. If you issue:
$ h cd
Then it will display all the history with the word 'cd'
On the another machine write this command.
pv -r /dev/zero | nc 192.168.1.1 7777
It will show live throughput between two machine.The destination machine ip is at our example 192.168.1.1
You must multiply by 8 for the network calculation.
You must install pv and netcat commands for this commands usage.
kerim@bayner.com
http://www.bayner.com/
Show a simple table with disk IO for the specified host. you monitor a LOT of different thing. Mostly used for MRTG and similar, but this is nice for a quick look, which disk is busy.
"public" is your SNMP community
ensure that snmpd is running on the host which you intend to monitor