Will find and list all core files from the current directory on. You can pass | xargs rm -i to be prompted for the removal if you'd like to double check before removal.
recurse through all files, get the message hash, flip the output as filename, hash value Show Sample Output
If you need to find some pictures on your disk but excluding some path.
Does a search and replace across multiple files with a subgroup replacement.
shows you the symlinks in the current directory, recursively, but without following them Show Sample Output
This find syntax seems a little easier to remember for me when I have to use -prune on AIX's find. It works with gnu find, too. Add whatever other find options after -prune Show Sample Output
This is a quick way to find what is hogging disk space when you get a full disk alert on your monitoring system. This won't work as is with filesystems that allow embedded spaces in user names or groups (read "Mac OS X attached to a Windows Domain"). In those cases, you will need to change the -k 5 to something that works in your situation. Show Sample Output
Use case insensitive regex to match files ending in popular video format extensions and calculate their total time. (traverses all files recursively starting from the current directory) Show Sample Output
Good for when you download youtube videos and want the mp3 for your mp3 player.
Sometimes I get FLAC files that RhythmBox can't play but VLC can. So I re-encode them using GStreamer at highest compression.
Same but will only returns the invalid file (great when emailing the list to the team).
A simple bash function to the find command. I use this much more than find itself. Show Sample Output
May require GNU find.
To search for files in /target_directory and all its sub-directories, that have been modified in the last 60 minutes:
find /target_directory -type f -mmin -60
To search for files in /target_directory and all its sub-directories, that have been modified in the last 2 days:
find /target_directory -type f -mtime -2
To search for files in /target_directory and all its sub-directories no more than 3 levels deep, that have been modified in the last 2 days:
find /target_directory -type f -mtime -2 -depth -3
This function will find the modification time in unix_time of the given file, then calculate the number of minutes from now to then and then find all files modified in that range. Show Sample Output
Recursive. Ignores non-media files. Requires ffprobe, paste, and bc. Show Sample Output
Caution: distructive overwrite of filenames Useful for concatenating pdfs in date order using pdftk
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: