morvacation.blogg.se

Grep in a directory
Grep in a directory




grep in a directory grep in a directory

If you are searching files in another dir: grep -s "string" /path/to/dir/Īnother option is to use the dotglob shell option, which will make a glob include hidden files. So the command you are looking for is: grep -s "string" *. gvfs: Permission denied †, so I suggest using -s, which hides all error messages. To avoid the "Is a directory" errors, you could use -d skip, but on my system I also get an error grep. In Bash, a glob will not expand into hidden files, so if you want to search all the files in a directory, you need to specify hidden files.






Grep in a directory