difference in number of files and directories ( from GUI and Command line )
Nils Kassube
kassube at gmx.net
Tue Oct 28 14:51:04 UTC 2014
Jatin khatri wrote:
> I'm trying to find total numbers of files and directories in my home
> folder using following two methods ... but the result is different in
> both ways
> tree /home/jatin | tail -1
> 3071 directories, 26455 files
> thus total containing items are 3071+26455=29525
> second using GUI ( right click on /home/jatin directory ..and then
> properties )
>
> it shows, 29,503 items, totalling
>
> why like that .... M I doing anything wrong ... is there any batter
> way to confirm total files and directories in my home folder ????
The difference may be caused by the way each application counts symbolic
links. I would always use find for such a task:
find /home/jatin -type d | wc -l
find /home/jatin -type l | wc -l
find /home/jatin -type f | wc -l
The commands will tell you the number of directories, symbolic links and
regular files respectively.
Nils
More information about the ubuntu-users
mailing list