Finding the Number of Files (inodes) in a Directory on Linux

On Linux, to find the number of files (inodes) in a directory:

$ find ./ | wc -l

to find the number of files (not directories) in a directory:

$ find ./ -type f | wc -l

to find the number of directories in a directory:

$ find ./ -type d | wc -l
  •  
  •  
  •  
  •  
  •  
  •  
Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

0 Replies to “Finding the Number of Files (inodes) in a Directory on Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *