diff --git a/README.md b/README.md index 3ec2a72..6b41cf0 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,22 @@ This creates `threads.html` and extracts all information into the directory. ## File Management +### Search for a specific string in files using grep in a designated directory + +`grep -rl "search-string" /path/to/search/dir` + + `-r`, `--recursive`: Enables recursive search in files. + `-R`, `--dereference-recursive`: Performs a recursive search and follows symlinks. + `--include=FILE_PATTERN`: Limits the search to files matching FILE_PATTERN. + `--exclude=FILE_PATTERN`: Excludes files and directories that match FILE_PATTERN. + `--exclude-from=FILE`: Excludes files that match any pattern listed in FILE. + `--exclude-dir=PATTERN`: Skips directories matching PATTERN. + `-L`, `--files-without-match`: Displays names of files with no matches. + `-l`, `--files-with-matches`: Shows names of files containing the search string. + `-i`, `--ignore-case`: Searches without considering case differences. + `-e`, `--regexp=PATTERN`: Searches using a specified pattern or multiple search strings. + `-w`, `--word-regexp`: Searches for the complete word. + ### List number of files (for instance, # of .mp4) ```ls *.mp4 | cat -n```