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 portfolio

Installation

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

  1. Clone the repository: git clone https://github.com/execRooted/filebyte.git cd filebyte
  2. 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 / --interactive for 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:

OptionDescription
1List files in current directory
2Analyze a specific file
3Analyze a directory
4Find duplicate files
5Show directory tree
6List all disks
7Search for files (regex)
8Show file type statistics
9Bit converter (bits, kbits, mbits, gbits, tbits)
0Exit

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

OptionShortDescription
--version-vShow version information
--help-hShow help information
--size <UNIT>-sShow file sizes with specified unit (auto, b/bytes, kb/kilobytes, mb/megabytes, gb/gigabytes, tb/terabytes)
--tree-tShow directory tree
--properties-pShow comprehensive file/directory analysis
--no-colorDisable colored output
--disk <DISK>-mDisk operations ('list' or specific disk name)
--search <PATTERN>-eSearch files using regex pattern
--excluding <PATTERN>-xExclude files matching regex pattern
--sort-by <CRITERIA>Sort by: name, size, date
--duplicatesFind duplicate files
--export <FILE>Export results to JSON/CSV
--file <FILE>-fAnalyze a specific file
--directory <DIR>-dAnalyze a directory as a whole
--recursive-rEnable recursive searching and analysis
--interactive-iEnable interactive menu mode