lightningliner.blogg.se

Treesize linux
Treesize linux









The output format is just JSON, so it is easy to reuse it with other programs as well, e.g.: ncdu -o - | python -m json. This way, you can first export only once, which can take hours, and then explore the files, quit, explore again, etc. Therefore, to store the memory regions of a process, Linux uses both a linked list and a red-black tree. This is very useful if you are dealing with a very large and slow filesystem like NFS. proportional to the logarithm of the tree size. Otherwise it seemed to go into some link infinite loop, likely due to: Īnother cool feature of ncdu is that you can first dump the sizes in a JSON format, and later reuse them.įor example, to generate the file run: ncdu -o ncdu.jsonĪnd then examine it interactively with: ncdu -f ncdu.json

#TREESIZE LINUX INSTALL#

To properly list root / on that system, I also needed -exclude-firmlinks, e.g.: brew install ncdu I can not take credit for this script, I pulled it from the web long ago from Andrew Clarke’s site. It is executed by simply typing treesize in any folder. Since we placed this new file in /sbin, we will be able to use it anywhere on the system. If the file system on the Linux / UNIX system is accessible through NFS, then it can. Next we need to make this file executable, do this with: chmod +x /bin/treesize.

treesize linux

Alternatively, If Samba is installed and running on the Linux / UNIX system, then our tools can access a share on this system using its UNC name, e.g. -exclude-kernfs skips special filesystems like /sys TreeSize can scan Linux / UNIX servers using the SSH protocol (see 'Scan Targets').-x stops crossing of filesystem barriers.

treesize linux

You likely want: ncdu -exclude-kernfs -x / "Total disk usage" vs "Apparent size" is analogous to du, and I have explained it at: why is the output of `du` often so different from `du -b` This way don't have to recalculate sizes as you move inside subdirectories as you try to determine what the disk hog is. Ncdu only calculates file sizes recursively once at startup for the entire tree, so it is efficient. Then, I enter down and right on my keyboard to go into the /drivers folder, and I see: This awesome CLI utility allows you to easily find the large files and directories (recursive total size) interactively.įor example, from inside the root of a well known open source project we do: sudo apt install ncdu









Treesize linux