1

What command can you use to quickly find which file on your home folder containing the umask command?

$ grep -rnw "umask" ~

1 Answers1

5

The pattern in grep is placed in front of the file/path:

grep [OPTIONS] PATTERN [FILE...]

To receive just the matching filenames instead of the matches, you should use -l option:

grep -rlw "umask" ~

If you want all matches of all files including their line number, you need to use -n instead of -l:

grep -rnw "umask" ~
pLumo
  • 27,991