npm i -g dujs
dujs .
╔═══════════════════════════════════════════════╤════════════╗
║ /home/chaksoft/tools/dujs │ 54.30 MiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/node_modules │ 54.09 MiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/.git │ 104 KiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/bin │ 8 KiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/lib │ 8 KiB. ║
╚═══════════════════════════════════════════════╧════════════╝
You can specify some options :
You can specify the depth of the search for the du command.
dujs -d 2 .
will set the depth to 2.
Be aware that a big depth could make the command take a very long time.
To avoid having a non-human size display (only displaying the number of kilobytes used), set the -n
flag.
To sort the directories by reversed order (lightest folders first), set the -r
flag.
dujs -r .
╔═══════════════════════════════════════════════╤════════════╗
║ /home/chaksoft/tools/dujs/bin │ 8 KiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/lib │ 8 KiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/.git │ 104 KiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs/node_modules │ 54.09 MiB. ║
╟───────────────────────────────────────────────┼────────────╢
║ /home/chaksoft/tools/dujs │ 54.34 MiB. ║
╚═══════════════════════════════════════════════╧════════════╝
Wrapping around the -a
flag of the du
command. Displays all the files that are scanned, respecting the depth property.
This software is licensed with the GPL-v3.0 license. See LICENSE file for further information.