SuperTree is a fast and powerful command-line tool like GNU Tree. It shows the directory structure of files and folders in a beautiful tree format. It also supports sorting by size, showing file sizes in KB, MB, GB or TB, and displaying only directories if needed.
-
Shows folder and file structure in a tree view
-
Shows sizes in bytes, KB, MB, GB, or TB
-
Sort by total size using the
-Sflag -
Show only directories with the
--dirs-onlyflag -
Show sizes next to each file or folder using
--size -
Limit the depth level with
-L -
Colored output for easy reading
-
JSON output option
Before building SuperTree, make sure the required build tools are installed on your system.
Debian/Ubuntu/Kali/Parrot:
sudo apt install build-essential -yArch/BlackArch/Manjaro:
sudo pacman -Sy base-devel --noconfirmFedora/RHEL/CentOS:
sudo dnf groupinstall "Development Tools" -yTermux:
pkg install clang make -yThese packages ensure that gcc or clang and make are available for compiling and building SuperTree.
- Linux (Debian, RHEL, Arch)
- Termux (Android)
- Clone the repository
git clone https://github.com/s-r-e-e-r-a-j/SuperTree.git- Go to the SuperTree directory
cd SuperTree- Build the program
make- Install on your system
For Linux:
Move the binary to /usr/local/bin:
sudo mv supertree /usr/local/bin/Now you can run it anywhere:
supertreeFor Termux:
Move the binary to $PREFIX/bin:
mv supertree $PREFIX/bin/Now you can use it in Termux:
supertree# supertree without any arguments will print the structure of the current working directory
supertree
# supertree with options and directory/path
supertree [options] [directory]
| Option | Description |
|---|---|
-L <num> |
Limit tree depth |
--dirs-only |
Show only directories |
--size |
Show sizes in readable units |
-S |
Sort by total size |
--json |
Output in JSON format |
Show current directory:
supertreeShow with sizes:
supertree --sizeSort by total size:
supertree -S --sizeOnly directories:
supertree --dirs-onlyLimit to 2 levels(only shows folders and files inside subfolders up to 2 levels):
supertree -L 2show a specific path:
supertree /home/user/projectsshow a specific path with size and size sorting:
supertree -S --size /var/logshow output as JSON:
supertree --json /home/user/Documentsshow a path limited to 2 levels deep (only shows folders and files inside subfolders up to 2 levels):
supertree -L 2 /etcsudo rm -f /usr/local/bin/supertreeThis project is licensed under the MIT License