Check These Out
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Taken from: http://www.webmasterworld.com/forum40/1310.htm
Using this command you can track a moment when usb device was attached.
This command would be useful when it is desirable to list only the directories.
Other options
Hidden directory
$ ls -d .*/
Other path
$ ls -d /path/to/top/directory/.*/
Long format:
$ ls -ld */
Replace 70 with the desired height.
Replace 180 with the desired width.
I put it in my bashrc, because by default my terminal is too small.
The solution to a year long (and extremely frustrating) problem I've had, caused by the fact that I only have one speaker; this command downmixes the stream to monophonic output, making sure I don't miss any of the music.
NOTE: When stream is in .m3u format, a -playlist option is required, as shown below:
$ mplayer -af pan=1:0.5:0.5 -channels 1 -playlist radiostream.m3u
This command works great with aliases for various channels in .bashrc. Sample below:
$ alias radio1='mplayer -af pan=1:0.5:0.5 -channels 1 radio1stream.pls'
alt + number + dot will insert last command argument at $number place, alt + 0 + . will print last command name. For example
$ ls /tmp /var
$ ls /usr /home
alt + 1 + . will result in '/usr' , if you press alt + . again, it will result in '/tmp'
alt + 0 + . -> 'ls'
Compute the md5 checksums for the contents of two mirrored directories, then sort and diff the results. If everything matches, nothing is returned. Otherwise, any checksums which do not match, or which exist in one tree but not the other, are returned. As you might imagine, the output is useful only if no errors are found, because only the checksums, not filenames, are returned. I hope to address this, or that someone else will!
AFAIR this is the wording ;)