Views:
599β
Votes: 2β
Tag :
files
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1029822
Title:
Difference in file count (Linux and Windows)
ID:
/2018/04/29/Difference-in-file-count-_Linux-and-Windows_
Created:
April 29, 2018
Edited: April 30, 2018
Upload:
October 9, 2026
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Windows cannot see the Ubuntu files, so you are getting count of Windows files only.
Ubuntu can see Windows, so you are getting file count of Windows plus Ubuntu.
Note that within Ubuntu you can get different file counts using different commands. For example:
rick@alien:~$ ls /mnt
c d e
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:~$ locate * | wc -l
861646
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
rick@alien:~$ find / * 2>/dev/null | wc -l
1262530
- Notice there are three Windows NTFS partitions that Ubuntu βseesβ.
- The
locatecommand only counts 861,646 files. It excludes Ubuntu system files and/tmpdirectory files. It includes Windows though. - The
findcommand counts 1,262,530 files and directories. It is also includes Windows plus Ubuntu system files and the/tmpdirectory files.