this post was submitted on 21 Feb 2024
29 points (96.8% liked)
Linux
48090 readers
792 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for your input! To me it seems like
Nemo
only counts the direct descendants and doesn't recurse, which makes it less useful for this purpose, but still nice to know!The
find
command could be your friend for getting a full depth count. Something like:Or just:
for the current directory.
There's also a command called
locate
(often with another letter in front, but accessible by just that word) which maintains a database of filenames on a system that can be used, provided it's installed and has built that database.Pro: Faster than churning the disk every time with
find
. (Though disk cache can help alleviate some of this).Cons: Can get out of date with a changing filesystem. Harder to search for relative paths like
.
... would be roughly equivalent to the first
find
example.