What command would I use to find all regular files under my

What command would I use to find all regular files under my home directory whose file size is less than 5 bytes, whose extension is .foo, and whose contents contain the whole word \'Linux\' (case insensitive). Make sure to print out the file name that contains the keyword! (Hint: You will use grep as one of the commands)

(This is using the Linux Terminal within the Linux OS)

Solution

Answer:

Hope the solution will be helpfull

find . -type f -name \"*.foo\" -size +5c -exec grep -i -H -E -o -c \"Linux\" {} \\;

What command would I use to find all regular files under my home directory whose file size is less than 5 bytes, whose extension is .foo, and whose contents con

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site