Execute this in the root of your music library and this recurses through the directories and normalizes each folder containing mp3s as a batch. This assumes those folders hold an album each. The command "normalize-audio" may go by "normalize" on some systems.
expands through shell and not find but may hits the limit of max argument size for rm (thus: for f in **/*.htm;do rm $f;done but then I prefer the find command ;)
pipe into | sed "s/$/\/(1024\*1024\*1024)/" | bc to get size in GB
cd / find `pwd` -name '.*' -prune -o \( -name *.h -o -name *.cpp \) -print | cscope -bi- export CSCOPE_DB=/cscope.out vim +'set cst'
A different approach to the problem - maintain a small sorted list, print the largest as we go, then the top 10 at the end. I often find that the find and sort take a long time, and the large file might appear near the start of the find. By printing as we go, I get better feedback. The sort used in this will be much slower on perls older than 5.8. Show Sample Output
When downloading files on a Mac, Apple adds the x-attribute: com.apple.quarantine. Often, this makes it so you can't even run a ./configure. This command gets rid of the quarantine for all files in the current directory.
Finds files modified today since 00:00, removes ugly dotslash characters in front of every filename, and sorts them. *EDITED* with the advices coming from flatcap (thanks!)
This begins recursively looking at dot files starting from "./path_to_dir". Then it prints out the names of those files. If you are satisfied with the list of files discovered then you can delete them like so `find ./path_to_dir -type f -name '.*' -exec rm '{}' \;` which executes the removal program against each of those names previously printed. This is useful when you want to remove thumbnail files on Mac OSX/Windows or simply want to reset an app's configuration on Linux.
unzips all zip files in any subdirectory under the current directory. The zip files are unzipped in their respective subdirs
All with only one pipe. Should be much faster as well (sort is slow). Use find instead of ls for recursion or reliability. Edit: case insensitive Show Sample Output
Search in all html files and remove the lines that 'String' is found.
Original submitter's command spawns a "grep" process for every file found. Mine spawns one grep with a long list of all matching files to search in. Learn xargs, everyone! It's a very powerful and always available tool.
Good for finding outdated timthumb.php scripts which need to be updated, anything over 2.0 should be secure, below that timthimb is vulnerable and can be used to compromise your website. Show Sample Output
Find top 5 big files
After this command you can review doit.sh file before executing it. If it looks good, execute: `. doit.sh`
Recursively find php files and replace tab characters with spaces. Options: "\*.php" -- replace this with the files you wish to find "expand" -- replace tabs with spaces (use "unexpand" to replace spaces with tabs) "-t4" -- tabs represent 4 spaces Note: The IFS="" in the middle is to prevent 'read' from eating leading/trailing whitespace in filenames.
Count your source and header file's line numbers For example for java change the command like this find . -name '*.java' -exec cat {} \;|wc -l Show Sample Output
This command is more robust because it handles spaces, newlines and control characters in filenames. It uses printf, not ls, to determine file size.
show directory three
Actually your func will find both files and directorys that contain ${1}. This one only find files. ..and to look only for dirs: finddir() { find . -type d -iname "*${*}*" ; }
Assuming only VIM has *~ files in your current dir. If you have usefull data in a file named in the *~ pattern, DO NOT RUN this command!
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: