commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
if you remove maxdepth, then all the folders will be searched and the status of zip file will be displayed only if it is corrupt.
While it seems (to me at least) a little counter-intuitive to filter on name first, this requires less work for find, as it allows it to immediately discount any files that do not match the name directly from the directory listing on disk. Querying against file attributes requires reading the file attributes, which is performed for all files matching any name based predicates.
Finds all C++, Python, SWIG files in your present directory (uses "*" rather than "." to exclude invisibles) and counts how many lines are in them. Returns only the last line (the total).
The command first deletes any old playlist calles playlist.tmp under /tmp. After that it recursively searches all direcotries under ~/mp3 and stores the result in /tmp/playlist.tmp. After havin created the playlist, the command will execute mplayer which will shuffle through the playlist.
This command is aliased to
m is aliased to `rm -rf /tmp/playlist.tmp && find ~/mp3 -name *.mp3 > /tmp/playlist.tmp && mplayer -playlist /tmp/playlist.tmp -shuffle -loop 0 | grep Playing'
in my ~/.bashrc.
Remove all empty directories below the current directory. If directories become empty as the results of this, remove those too.
This normalizes volume in your mp3 library, but uses mp3gain's "album" mode. This applies a gain change to all files from each directory (which are presumed to be from the same album) - so their volume relative to one another is changed, while the average album volume is normalized. This is done because if one track from an album is quieter or louder than the others, it was probably meant to be that way.
Searches your $PATH for whatever you substitute for bash, though not sure if this will work if you substitute a different shell for bash!
This is not recommended... lossy -> lossy = lossier.
Still, you can do it! ;)
Find C/C++ source files and headers in the current directory.
This makes an alias for a command named 'busy'. The 'busy' command opens a random file in /usr/include to a random line with vim. Drop this in your .bash_aliases and make sure that file is initialized in your .bashrc.
See http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html if you are unclear about the Google Analytics cookie system. If Firefox is your daily browser, be a good Orwellian and run this command regularly.
If you see, 'SQL error near line 1: database is locked', close Firefox and run again.
Read all contents from current directory and display to stdout.
Read all contents from current directory and display it on stdout.
find all files in cur dir add to url and append to file
Find every file and move it to current directory.