Check These Out
-B flag = don't include characters that can be confused for other characters (this helps when you give someone their password for the first time so they don't cause a lockout with, for example, denyhosts or fail2ban)
-s flag = make a "secure", or hard-to-crack password
-y flag = include special characters (not used in the example because so many people hate it -- however I recommend it)
"1 10" = output 1 password, make it 10 characters in length
For even more secure passwords please use the -y flag to include special characters like so:
$ pwgen -Bsy 10 1
output>> }&^Y?.>7Wu
One of the first functions programmers learn is how to print a line. This is my 100% bash builtin function to do it, which makes it as optimal as a function can be. The COLUMNS environment variable is also set by bash (including bash resetting its value when you resize your term) so its very efficient. I like pretty-output in my shells and have experimented with several ways to output a line the width of the screen using a minimal amount of code. This is like version 9,000 lol.
This function is what I use, though when using colors or other terminal features I create separate functions that call this one, since this is the lowest level type of function. It might be better named printl(), but since I use it so much it's more optimal to have the name contain less chars (both for my programming and for the internal workings).
If you do use terminal escapes this will reset to default.
$ tput sgr0
For implementation ideas, check my
http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.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.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
list top committers (and number of their commits) of svn repository.
in this example it counts revisions of current directory.
If your locale has Monday as the first day of the week, like mine in the UK, change the two $7 into $6
Using this command you can track a moment when usb device was attached.