filebyte
A powerful, colorful CLI tool to list files and directories with intelligent size formatting, advanced filtering, and comprehensive file analysis. Built with Rust.
← Back to portfolioInstallation
filebyte is a powerful, colorful CLI tool to list files and directories with intelligent size formatting, advanced filtering, and comprehensive file analysis. It is built with Rust for speed and reliability, and is available on crates.io and the AUR.
Cargo (recommended)
cargo install filebyte
Automated installation
- Clone the repository:
git clone https://github.com/execRooted/filebyte.git cd filebyte - Run the installer:
sudo ./install.sh
The installer will automatically:
- Install Rust if not present
- Build filebyte with optimizations
- Install it system-wide to
/usr/local/bin/filebyte
Arch Linux (AUR)
paru -S filebyte
# Or any other AUR helper
Manual build
git clone https://github.com/execRooted/filebyte.git
cd filebyte
cargo build --release
# Binary will be available at target/release/filebyte
Uninstallation
cd filebyte
sudo ./uninstall.sh
On Arch Linux: paru -R filebyte
Features
- Smart size display — automatically chooses appropriate units (B, KB, MB, GB, TB).
- Advanced filtering — regex-based search and exclusion patterns.
- File statistics — type detection, size analysis, and detailed metadata.
- Disk analysis — view disk usage and manage storage across mount points.
- Export support — export results to JSON or CSV formats.
- Duplicate detection — find and analyze duplicate files.
- Comprehensive properties — creation/modification dates, permissions, and more.
- Directory tree — render a tree of a directory with
-t/--tree. - Interactive menu — launch with
-i/--interactivefor easy file operations and a bit converter.
Usage
Run filebyte with no arguments to list the current directory (permissions & dates shown by default):
filebyte
List a specific directory, show a tree, or analyze a file/directory:
filebyte /home/user/Documents
filebyte --tree
filebyte -w /path/to/file.txt
filebyte -w /path/to/directory
Size formatting
filebyte # permissions and modification dates (default)
filebyte -s # file sizes in auto-detected units
filebyte -s mb # Megabytes
filebyte -s gb # Gigabytes
filebyte -s b # Bytes
Advanced filtering
filebyte --search "\.rs$" # find Rust files
filebyte --search "config" # find files containing "config"
filebyte --excluding "^\." # hide hidden files
filebyte --excluding "temp" # exclude temp files
filebyte --search "\.txt$" --excluding "old"
File analysis
filebyte -p # comprehensive analysis for current directory
filebyte -p README.md # detailed properties for a specific file
filebyte -f src/main.rs # analyze a specific file in detail
filebyte -d /home/user # analyze a directory's metadata
filebyte --duplicates # find duplicate files
Disk operations
filebyte --disk list # list all disks
filebyte --disk /dev/sda1 # analyze a specific disk
filebyte --disk list --size gb
Sorting & export
filebyte --sort-by size # largest files first
filebyte --sort-by date # newest files first
filebyte --sort-by name # alphabetical
filebyte --export results.json
filebyte --export analysis.csv
Interactive menu
filebyte -i
filebyte --interactive
The interactive menu provides a user-friendly interface:
| Option | Description |
|---|---|
1 | List files in current directory |
2 | Analyze a specific file |
3 | Analyze a directory |
4 | Find duplicate files |
5 | Show directory tree |
6 | List all disks |
7 | Search for files (regex) |
8 | Show file type statistics |
9 | Bit converter (bits, kbits, mbits, gbits, tbits) |
0 | Exit |
Bit converter (option 9) converts between bits and bytes. Input formats: 1000 bits, 500 kbits, 1.5 mbits, 2 gbits. The menu clears the screen between operations for a clean interface.
Command line options
| Option | Short | Description |
|---|---|---|
--version | -v | Show version information |
--help | -h | Show help information |
--size <UNIT> | -s | Show file sizes with specified unit (auto, b/bytes, kb/kilobytes, mb/megabytes, gb/gigabytes, tb/terabytes) |
--tree | -t | Show directory tree |
--properties | -p | Show comprehensive file/directory analysis |
--no-color | Disable colored output | |
--disk <DISK> | -m | Disk operations ('list' or specific disk name) |
--search <PATTERN> | -e | Search files using regex pattern |
--excluding <PATTERN> | -x | Exclude files matching regex pattern |
--sort-by <CRITERIA> | Sort by: name, size, date | |
--duplicates | Find duplicate files | |
--export <FILE> | Export results to JSON/CSV | |
--file <FILE> | -f | Analyze a specific file |
--directory <DIR> | -d | Analyze a directory as a whole |
--recursive | -r | Enable recursive searching and analysis |
--interactive | -i | Enable interactive menu mode |