Check These Out
Thanks to comment if that works or not...
If you have already typed that snippet or you know you already have IO::Interface::Simple perl module, you can type only the last command :
$ perl -e 'use IO::Interface::Simple; my $ip=IO::Interface::Simple->new($ARGV[0]); print $ip->address,$/;'
( The first perl command will install the module if it's not there already... )
Keep width to a power of 2 to see patterns emerge. 512 is good. So is 4096 for huge maps.
PNM headers are super basic.
http://netpbm.sourceforge.net/doc/pbm.html
So I had this 2TB Seagate external disk/USB enclosure which by default would spin-down its internal drive (it enters a standby mode) after four minutes of inactivity.. Spinning-up the inactive drive was an annoying delay when accessing files and also it severely interfered with NFS.. SCT stands for "Standby Condition Timer".
To completely disable SCT:
$ sdparm --clear STANDBY -6 /dev/sdb
To return to original (default) SCT settings:
$ sdparm -D -p 0x1a -6 /dev/sdb
To verify the settings (before and after):
$ sdparm -a /dev/sdb
No need for vendor-provided MSWIN tools, etc.
This will comment out a line, specified by line number, in a given file.
exclude-dir option requires grep 2.5.3
This searches the Apache error_log for each of the 5 most significant Apache error levels, if any are found the date is then cut from the output in order to sort then print the most common occurrence of each error.
Filter comments and empty lines in files. I find this very useful when trying to find what values are actually set in a very long example config file.
I often set an alias for it, like :
alias nocomment='grep -v "^\($\|#\)"'
Convert readable date/time with `date` command
Display a passive popup during seconds. Additionnaly, --title can be used to set the title of the popup. This is a nice way to communicate with a desktop user of a machine you have an SSH access on :
DISPLAY=:0 sudo -u $user -H kdialog --passivepopup "Hello you" 10 --title "cli IM"