wc to confirm the count:
Without a search term (ex:
find will output everything it sees to
stdout (stdout stands for Standard Out, you’ll see it in terminal).
sudo find '/bin/' '/lib/' '/lib32/' '/libx32/' '/sbin/' '/boot/'
If you counted every line of that output, you’d know how many files/directories are in those folders.
To count things automatically you’d use
wc and the
-l flag counts by line.
wc -l you’d use a pipe:
sudo find '/bin/' '/lib/' '/lib32/' '/libx32/' '/sbin/' '/boot/' | wc -l
^ Add 6 to the count if you want to include the searched directories.
If you only want to count files, just add
-type f to
sudo find '/bin/' '/lib/' '/lib32/' '/libx32/' '/sbin/' '/boot/' -type f | wc -l
Using a GUI file manager
File managers run under your user account so they only have permission to see things your user can see for security. Ex: you can’t see what’s in /boot/grub2/
This is not recommended but a GUI way to confirm the count would be using your file manager with root privileges. For gnome’s file manager, in terminal use:
- Click the hamburger menu and confirm “Show Hidden Files” is checked.
nautilus doesn’t count hidden files unless you’ve opted to see them)
- Navigate to
/, AKA the File System directory.
- Hold down Ctrl and click on every directory you’d like to count.
(Ignore the tooltip on the bottom right as it’s a count of 1 level deep only)
- Right-click on one of the highlighted directories.
- Click Properties.
- “Contents” will show the count of every file and directory inside the selected folders.