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:
Searches all files,dirs (also hidden) recursively
There is 1 alternative - vote for the best!
This is how I typically grep. -R recurse into subdirectories, -n show line numbers of matches, -i ignore case, -s suppress "doesn't exist" and "can't read" messages, -I ignore binary files (technically, process them as having no matches, important for showing inverted results with -v)
I have grep aliased to "grep --color=auto" as well, but that's a matter of formatting not function.
shorter typing with no need to use xargs.
ack seeks for , list all found files and display everything in nice colors. Look for it in http://betterthangrep.com/
options: -n line nbrs, -i ignore case, -s no "doesn't exist", -I ignore binary
args: * for all files of current dir (not hidden), .[!.]* for all hidden files
I don't include by default the -R (recursive) option, which is not always useful. You add it by hand when needed.
If you can do better, submit your command here.
You must be signed in to comment.