I want to find files in Linux, in a specific directory without looking into its subdirectories, which contains in their text a specific string. From this answer, iI tried this after removing the r of recursion :
grep -nw '/path/to/somewhere/' -e "pattern" But it not working. I tried also this with skipping directory optin:
grep -rnw -d skip '/path/to/somewhere/' -e "pattern" I tried to exclude any directory that itsis different thanfrom the current directory, but also no way:
grep -rnw -exclude-dir '[^.]' '../../path/to/somewhere/' -e "pattern"