Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

find / -xdev | wc -l

This is a command I found. COuld anybody help me understand what is -xdev and what is wc -l?

Thank you so much!

share|improve this question

migrated from Nov 7 '12 at 8:30

This question came from our site for professional and enthusiast programmers.

Please do one round of research before posting here. – Konza Nov 7 '12 at 7:05
up vote 4 down vote accepted

From the find(1) man page:

    -xdev  Don't descend directories on other filesystems.

find won't cross mount points.

From the wc(1) man page:

       wc - print newline, word, and byte counts for each file


       -l, --lines
              print the newline counts

wc counts the number of lines being piped in.

share|improve this answer

try ls -l | wc -l this will count number of files and folders in any directory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.