Could anybody tell me how to count number of inodes of files inside a directory ?
Thanks.
Could anybody tell me how to count number of inodes of files inside a directory ?
Thanks.
There is one inode per directory, and one for each file in it. If you symlink a file, the symlink gets it's own unique inode as well. (I'm sure someone will correctly me if I've missed any edge cases.)
List the inode number of each file:
ls -i
To count the number of files in the current directory:
ls -1 | wc -l
see also: How to count number of files in multiple directories