Commands using find (1,252)

What's this?

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.

Share Your Commands


Check These Out

preserve disk; keep OS clean
if you use disk-based swap then it can defeat the purpose of this function.

Recursively grep thorugh directory for string in file.
-R, -r, --recursive Read all files under each directory, recursively; this is equivalent to the -d recurse option.

A nice way to show git commit history, with easy to read revision numbers instead of the default hash

Convert a string to

generate iso

ignore .DS_Store forever in GIT
With a couple of little commands, you?ll be able to ignore the .DS_Store files forever from your git repositories on mac! The following command will add the .gitignore file to the git configuration git config --global core.excludesfile ~/.gitignore then, the following, will add the .DS_Store to the list echo .DS_Store >> ~/.gitignore

exec chmod to subfiles
Using `-exec cmd {} +` causes find to build the command using all matching filenames before execution, rather than once per file.

bash shell expansion
The expansion {,} in bash will repeat the given string once for each item seperated by commas. The given command will result in the following being run: cp /really/long/path/and/file/name /really/long/path/and/file/name-`date -I` These can be embedded as needed, ex: rm file{1,2,3{1,2,3}} would delete the files file1, file2, file31, file32, file32, and no other files.

posts an xml file to a webservice with curl

Find all symlinks that link to directories


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: