Check These Out
The command renames all files in a certain directory. Renaming them to their date of creation using EXIF. If you're working with JPG that contains EXIF data (ie. from digital camera), then you can use following to get the creation date instead of stat.
* Since not every file has exif data, we want to check that dst is valid before doing the rest of commands.
* The output from exif has a space, which is a PITA for filenames. Use sed to replace with '-'.
* Note that I use 'echo' before the mv to test out my scripts. When you're confident that it's doing the right thing, then you can remove the 'echo'... you don't want to end up like the guy that got all the files blown away.
Credits: http://stackoverflow.com/questions/4710753/rename-files-according-to-date-created
It works best as part of a function, such as the following:
MUSICROOT=~/Music
function fplay {
if [ $1 = '-v' ]; then
shift 1
find -E $MUSICROOT -type f -iname "*$**" -iregex '.*\.(3g[2|p]|aac|ac3|adts|aif[c|f]?|amr|and|au|caf|m4[a|r|v]|mp[1-4|a]|mpeg[0,9]?|sd2|wav)' -print -exec afplay "{}" \; &
else
find -E $MUSICROOT -type f -iname "*$**" -iregex '.*\.(3g[2|p]|aac|ac3|adts|aif[c|f]?|amr|and|au|caf|m4[a|r|v]|mp[1-4|a]|mpeg[0,9]?|sd2|wav)' -exec afplay "{}" \; &
fi
}
Requires googlecl (http://code.google.com/p/googlecl/)
Even better when you wrap this in a script and allow the --date=STRING to be $1. Then you can type:
whatson "next Thursday"
The date string for UNIX date is very flexible. You can also add --cal "[regex]" to the end for multiple calendars.
you have to replace "mustek_usb" with the scanner found by `scanimage -l`
This is an extract from a larger script which makes up slideshow videos from images. $seconds is the number of seconds the video will last, and $num is a loop counter which numbers the videos for concat into a longer video later, so they will be in order. The dev/null bit on the end cuts ffmpeg's verbosity.
You can convert any UNIX man page to .txt
Shows a less detailed output, made only of the process tree and their pids.
A bit shorter ;)
Advanced revision to the command 8776 . This revision follows symbolic links.
The quotation-marks surrounding $(which $1) allows for graceful handling of errors ( ie. readlink does not complain incase 'which' command generates (null) output)