Quantcast
Channel: Commands tagged find text sorted by votes
Browsing all 8 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

find files containing text

$ grep -lir "some text" * -l outputs only the file names -i ignores the case -r descends into subdirectories View this command to comment, vote or add to favourites View all commands by decept by David...

View Article



Image may be NSFW.
Clik here to view.

find files containing text

$ grep -lir "sometext" * > sometext_found_in.log I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file View...

View Article

Image may be NSFW.
Clik here to view.

Find all files containing a word

$ grep -rHi searchphrase *.php shorter :p View this command to comment, vote or add to favourites View all commands by psybermonkey by David Winterbottom (codeinthehole.com)

View Article

Image may be NSFW.
Clik here to view.

List files containing given search string recursively

$ find /path/to/dir -type f -print0 | xargs -0 grep -l "foo" View this command to comment, vote or add to favourites View all commands by apotheos by David Winterbottom (codeinthehole.com)

View Article

Image may be NSFW.
Clik here to view.

find files containing text

$ grep -H -r "string" ./* >> grep.txt View this command to comment, vote or add to favourites View all commands by leonteale by David Winterbottom (codeinthehole.com)

View Article


Image may be NSFW.
Clik here to view.

Recursively search and replace old with new string, inside every instance of...

$ find . -type f -name filename.exe -exec sed -i "s/oldstring/oldstring/g" {} +; This is a slightly modified version of...

View Article

Image may be NSFW.
Clik here to view.

A command to find and replace text within conf files in a single directory.

$ find -type f -name '*.conf' -exec sed -Ei 's/foo/bar/' '{}' \; note that sed -i is non-standard (although both GNU and current BSD systems support it) Can also be accomplished with find . -name...

View Article

Image may be NSFW.
Clik here to view.

Search for a line of text in a directory of files recursively (while limiting...

$ egrep -ir --include=*.{php,html,css} "(first|second)" . View this command to comment, vote or add to favourites View all commands by CMCDragonkai Diff your entire server config at ScriptRock.com

View Article

Browsing all 8 articles
Browse latest View live




Latest Images