Check These Out
Uses mime-type of files rather than relying on file extensions to find files of a certain type.
This can obviously be extended to finding files of any other type as well.. like plain text files, audio, etc..
In reference to displaying the total hours of video (which was earlier posted in command line fu, but relied on the user having to supply all possible video file formats) we can now do better:
$ find ./ -type f -print0 | xargs -0 file -iNf - | grep video | cut -d: -f1 | xargs -d'\n' /usr/share/doc/mplayer/examples/midentify | grep ID_LENGTH | awk -F "=" '{sum += $2} END {print sum/60/60; print "hours"}'
Show apps that use internet connection at the moment.
Can be used to discover what programms create internet traffic. Skip the part after awk to get more details, though it will not work showing only unique processes.
This version will work with other languages such as Spanish and Portuguese, if the word for "ESTABLISHED" still contain the fragment "STAB"(e.g. "ESTABELECIDO")
This command will give you a list of available keyboard shortcuts according to stty.
This is a very simple way to input a large number of seconds and get a more useful value in minutes and seconds. Avoids useless use of echo.
Play files in shuffle mode with bash and mpg123.
Why bother using big-as-hell stuff like mplayer? This will play all your music files contained in */* (in my case author/song.format) with bash and mplayer showing a nice output.
atime and mtime timestamps of $FILE2 is changed according to the ones of $FILE1. If $FILE2 doesn't exist is created.
Quick and dirty version. I made a version that checks if a manpage exists (but it's not a oneliner). You must have ps2pdf and of course Ghostscript installed in your box.
Enhancements appreciated :-)
This command monitors changes in the current folder structure (subfolders included) and files, and log it into a hidden file in the same folder, called `.file_changes_YYMMDD.log`. Modify the `--exclude` parameters to define what should be skipped.
This will parse a random command json entry from http://commandlinefu.com
A must have in your .bash_profile to learn new shell goodies at login!!!