PrepAway - Latest Free Exam Questions & Answers

Which command chain will count the number of regular files with the name of foo.txt within /home?

Which command chain will count the number of regular files with the name of foo.txt within
/home?

PrepAway - Latest Free Exam Questions & Answers

A.
ls -lR /home | grep foo.txt | wc -l

B.
find /home -type f -name foo.txt | wc -l

C.
find /home -name foo.txt -count

D.
find /home -name foo.txt | wc -l

E.
grep -R foo.txt /home | wc -l

One Comment on “Which command chain will count the number of regular files with the name of foo.txt within /home?

  1. Marek says:

    find /home

    -type f
    Regular file

    -name “foo.txt”
    Name pattern

    |
    Piping information to next command

    wc
    Prints the number of newlines, words, and bites

    -l
    Prints the newline counts




    2



    0

Leave a Reply