Gregg, thanks for submitting a bug report. `ls -l` won't show hidden files or subdirectories. I was unable to download the link you sent, but I grabbed the download link from torproject.org:
wget https://dist.torproject.org/torbrowser/14.0.7/tor-browser-linux-x86_64-14.0.7.tar.xz tar xf tor-browser-linux-x86_64-14.0.7.tar.xz tree -a tor-browser | tail -n 1 30 directories, 225 files find tor-browser -type f | wc -l 225 # Using fd-find (https://github.com/sharkdp/fd) fd -H -tf '' tor-browser/ | wc -l 225 # How about ls? ls -l tor-browser | wc -l 3 # Weird... try again with --recursive ls -l --recursive tor-browser | wc -l 305 # Now it's overcounting. This is actually because ls does some pretty-printing (which prints extra lines): ls -lR | head -n10 .: total 119332 drwx------ 3 benjamin benjamin 100 Mar 12 10:06 tor-browser -rw-r--r-- 1 benjamin benjamin 122193072 Mar 3 17:00 tor-browser-linux-x86_64-14.0.7.tar.xz ./tor-browser: total 42920 drwx------ 10 benjamin benjamin 960 Mar 3 04:37 Browser -rwx------ 1 benjamin benjamin 1729 Mar 3 04:37 start-tor-browser.desktop -rw-r--r-- 1 benjamin benjamin 43943480 Mar 12 10:06 tor-browser-linux-x86_64-14.0.7.tar.xz --- Generally, `ls` is not the most reliable way to count files. I'd recommend to stick to `find`, as it seems to work better with other tools like `wc`. ** Changed in: linux (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/2100730 Title: ls Undercounts Files/Directories on btrfs Kubuntu 24.04 Status in linux package in Ubuntu: Invalid Bug description: Description: On a fresh Kubuntu 24.04 installation using the Btrfs filesystem, the ls command fails to list all files and directories correctly after extracting tarballs. The find command, however, accurately shows the full count of files and directories. This issue was first observed with zstd compression enabled on Btrfs and persisted unchanged after switching to lzo compression as part of troubleshooting efforts. Steps to Reproduce: Install Kubuntu 24.04 with Btrfs, initially configured with compress=zstd (later changed to compress=lzo during troubleshooting). Download a tarball, such as the Tor Browser tarball: bash wget https://www.torproject.org/dist/torbrowser/14.0.6/tor-browser- linux-x86_64-14.0.6.tar.xz Extract the tarball: bash tar -xJvf tor-browser-linux-x86_64-14.0.6.tar.xz Compare the outputs of the following commands: ls -l tor-browser/ | wc -l (undercounts files, e.g., shows ~20 instead of ~295). find tor-browser/ -type f | wc -l (shows the correct file count, e.g., ~295). Expected Behavior: The ls command should list all files and directories, matching the contents of the tarball and the output of the find command. Actual Behavior: The ls command lists significantly fewer files than actually exist (e.g., 20 instead of 295), while find correctly identifies all files. System Information: OS Version: Kubuntu 24.04 Kernel Version: 6.8.0-54-generic Btrfs Version: [Run btrfs --version in your terminal and insert the output here, e.g., v6.8] Mount Options: defaults,subvol=@,relatime,discard,compress=lzo (initially compress=zstd, switched to lzo with no effect) Additional Notes: The issue occurs consistently across multiple tarballs (e.g., SQLite, Tor Browser). No relevant errors appear in dmesg or journalctl related to Btrfs or file operations. Switching from zstd to lzo compression was attempted as a troubleshooting step but did not resolve the issue. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2100730/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp

