A Bash script that displays a recursive directory tree with file permissions (octal), owner:group information, and color-coded output (blue for directories, green for files).
Similar to the tree command but includes detailed stat information in a clean format.
Usage:
./stat-tree.sh /path/to/directoryOutput example:
755 user:group subdir1/
├── 755 user:group abc/
│ └── 755 user:group xyz/
├── 644 user:group file.txt
└── 755 user:group subdir2/
4 directories, 1 file
Features:
- Displays octal permissions (e.g., 755, 644)
- Shows owner and group for each item
- Color-coded output (directories in blue, files in green)
- Proper tree structure with UTF-8 box drawing characters
- Sorted output for consistent results
- Summary count of directories and files