File Upload Scripts Collection

A collection of enhanced bash scripts for uploading files to popular temporary file hosting services. Each script features an interactive file browser using fzf, automatic clipboard integration, and service-specific optimizations.

🎥 Demo Video - Watch Here

See the scripts in action with interactive file browsing and upload demonstrations.

🔧 Requirements

Before using any of these scripts, ensure you have the following dependencies installed:

Essential Dependencies

  • fzf - For interactive file selection
  • curl - For HTTP requests (required by all scripts)
  • xclip - For automatic URL clipboard copying (optional but recommended)

Installation Commands (Arch Linux)

sudo pacman -S fzf curl xclip

Optional Dependencies

  • jq - Better JSON parsing (recommended for uguu and 0x0)
  • bat - Syntax highlighting in file previews
  • chafa - Image previews in terminal (Note: may cause visual artifacts that persist in terminal)
sudo pacman -S jq bat chafa

🎯 Interactive Mode

All scripts support interactive mode when run without arguments. This opens a file browser powered by fzf with the following features:

  • Multi-file Selection: Use Tab to select multiple files, Enter to confirm
  • File Previews: See file content, size, type, and modification date
  • Image Previews: Terminal image previews with chafa (if installed, though may leave visual artifacts in terminal)
  • Smart Search: Type to filter files by name or path
  • Directory Navigation: Browse through your filesystem

Interactive Controls

  • Tab: Select/deselect files for multi-upload
  • Enter: Confirm selection and proceed with upload
  • Esc: Cancel and exit
  • Alt+P: Toggle preview window
  • Ctrl+/: Change preview window layout

📁 Scripts Overview

Script Service Type Max Size Default Expiry Features
uguu uguu.se Temporary 128 MiB 3 hours (fixed) Simple, fast uploads
0x0 0x0.st Temporary 512 MiB 0x0 standard (30d-1y) Secret URLs, custom expiry, file deletion
catbox catbox.moe Permanent 200 MiB Permanent User hash management, permanent storage, file deletion
litterbox litterbox.catbox.moe Temporary 1 GB 72 hours (script default) Temporary with custom expiry

🌐 Scripts Details

1. uguu - Simple & Fast

Service: uguu.se
Link: https://files.catbox.moe/nja405.txt

Features

  • File Size Limit: 128 MiB
  • Expiry: Fixed 3 hours (not customizable via script)
  • Type: Temporary file hosting
  • Special Features:
    • Fastest upload process
    • Automatic JSON response parsing
    • URL download support
    • Multi-file batch uploads

Usage Examples

# Upload specific file
uguu file.jpg

# Upload from URL
uguu https://example.com/image.png

# Interactive browser
uguu

# Multi-file selection in Pictures directory
uguu -d ~/Pictures -m

Command Options

  • -d, --dir <directory> - Search directory (default: current directory)
  • -s, --silent - Silent mode (less output)
  • -m, --multi - Enable multi-file selection
  • -1, --single - Disable multi-file selection
  • -h, --help - Show help

2. 0x0 - Advanced & Customizable

Service: 0x0.st
Link: https://files.catbox.moe/5w9bwp.txt

Features

  • File Size Limit: 512 MiB
  • Expiry: Customizable (hours) or default 0x0 standard (minimum 30 days, maximum 1 year based on file size)
  • Type: Temporary file hosting
  • Special Features:
    • Secret URLs - Generate hard-to-guess URLs
    • Custom Expiry - Set expiration in hours
    • File Deletion - Delete uploaded files with tokens
    • Token Management - Automatic token logging in ~/.0x0_tokens.log

Usage Examples

# Basic upload (uses 0x0 default expiry: 30 days minimum, up to 1 year)
0x0 file.jpg

# Custom expiry with 24 hours
0x0 -e 24 file.jpg

# Secret URL with 24h expiry
0x0 -S -e 24 file.jpg

# Delete previously uploaded file
0x0 -d https://0x0.st/abc.jpg

# Upload from URL
0x0 https://example.com/file.pdf

Command Options

  • -d, --dir <directory> - Search directory
  • -d, --delete <URL> - Delete file using URL
  • -s, --silent - Silent mode
  • -m, --multi - Multi-file selection
  • -1, --single - Single file selection
  • -e, --expires <hours> - Set expiration time
  • -S, --secret - Generate secret URL
  • -h, --help - Show help

Token Management

The script automatically saves deletion tokens to ~/.0x0_tokens.log. Format:

YYYY-MM-DD HH:MM:SS: https://0x0.st/abc.jpg | Token: xyz123

3. catbox - Permanent Storage with Enhanced Management

Service: catbox.moe
Link: https://files.catbox.moe/ez0thf.txt

Features

  • File Size Limit: 200 MiB
  • Expiry: Permanent (never expires)
  • Type: Permanent file hosting
  • Special Features:
    • User Hash Management - Set and save userhash for account linking
    • Permanent Storage - Files never expire when linked to account
    • File Deletion - Delete files using userhash
    • URL Upload Support - Upload files directly from URLs
    • Config File Storage - Saves userhash to ~/.catbox_config

Usage Examples

# Interactive file browser
catbox

# Upload specific file
catbox file.jpg

# Upload from URL
catbox https://example.com/image.png

# Set and save userhash
catbox -u your_userhash_here

# Show current userhash
catbox -u

# Upload with specific userhash
catbox -u your_userhash file.jpg

# Delete files (requires userhash)
catbox -d file1.png file2.gif

# Browse specific directory
catbox -d ~/Pictures

# Silent mode upload
catbox -s file.jpg

Command Options

  • -u, --userhash [<hash>] - Set or display userhash (omit hash to show current)
  • -d, --dir <directory> - Search directory (default: current directory)
  • -d, --delete <files> - Delete files (space-separated filenames, requires userhash)
  • -s, --silent - Silent mode (less output)
  • -m, --multi - Enable multi-file selection
  • -1, --single - Disable multi-file selection
  • -h, --help - Show help

Setup and Configuration

  1. Get your userhash from catbox.moe account settings
  2. Set userhash: catbox -u your_userhash_here
  3. Verify setup: catbox -u (should show your saved hash)
  4. Files uploaded with userhash are linked to your account

The script automatically saves your userhash to ~/.catbox_config for future use.

File Management

  • Upload files: Files uploaded with a userhash are permanently stored and linked to your account
  • Delete files: Use catbox -d filename1 filename2 to delete files (requires userhash)
  • Anonymous uploads: Files uploaded without a userhash are still permanent but not linked to an account

4. litterbox - Temporary with Flexible Control

Service: litterbox.catbox.moe
Link: https://files.catbox.moe/b57y2b.txt

Features

  • File Size Limit: 1 GB
  • Expiry: Customizable with -e flag (1h/12h/24h/72h), defaults to 72h
  • Type: Temporary file hosting
  • Special Features:
    • Flexible Expiry - Choose from 1h, 12h, 24h, or 72h
    • Same Infrastructure - Uses catbox.moe infrastructure
    • No Account Required - Anonymous temporary uploads
    • URL Upload Support - Upload files directly from URLs
    • Large File Support - Supports files up to 1 GB

Usage Examples

# Interactive file browser (default 72h expiry)
litterbox

# Upload specific file with default expiry
litterbox file.jpg

# Upload with 1 hour expiry
litterbox -e 1h file.jpg

# Upload from URL with 24h expiry
litterbox -e 24h https://example.com/file.zip

# Interactive mode with custom directory
litterbox -d ~/Downloads

# Multi-file upload with custom expiry
litterbox -e 12h -m

# Silent mode upload
litterbox -s -e 1h file.pdf

Command Options

  • -d, --dir <directory> - Search directory (default: current directory)
  • -s, --silent - Silent mode (less output)
  • -m, --multi - Enable multi-file selection
  • -1, --single - Disable multi-file selection
  • -e, --expires <time> - Set expiry (1h/12h/24h/72h, default: 72h)
  • -h, --help - Show help

Expiry Options

  • 1h - Files expire after 1 hour
  • 12h - Files expire after 12 hours
  • 24h - Files expire after 24 hours
  • 72h - Files expire after 72 hours (default)

🚀 Quick Setup

  1. Download Scripts
    # Download all scripts to ~/bin/ or /usr/local/bin/
    chmod +x uguu 0x0 catbox litterbox
    
  2. Install Dependencies
    sudo pacman -S fzf curl xclip jq bat chafa
    
  3. Configure catbox (optional)
    # Set your catbox userhash for permanent uploads
    catbox -u your_userhash_here
    
  4. Test Installation
    1
    2
    3
    4
    5
    # Test interactive mode
    uguu
    0x0
    catbox
    litterbox
    

📋 Feature Comparison

Feature uguu 0x0 catbox litterbox
Interactive Browser
Multi-file Upload
URL Upload
Clipboard Copy
Custom Expiry ❌ (Permanent)
Secret URLs
File Deletion
Account Integration
Max File Size 128 MiB 512 MiB 200 MiB 1 GB
Config File ✅ (~/.catbox_config)
Anonymous Upload

💡 Tips & Best Practices

File Naming & Installation

  • Save scripts without extensions: Save as uguu, 0x0, catbox, litterbox (not .sh)
  • Add to PATH: Place scripts in ~/bin/ or /usr/local/bin/ for global access
  • Make executable: Always run chmod +x script_name after downloading

General Usage

  • Use uguu for quick temporary shares (3h limit)
  • Use 0x0 for longer temporary shares with custom expiry and secret URLs
  • Use catbox for permanent storage with account management
  • Use litterbox for controlled temporary shares up to 1 GB
  • Interactive Mode: Run any script without arguments to open file browser
  • Multi-Selection: Use Tab in interactive mode to select multiple files

Service-Specific Tips

uguu Usage

  • Files automatically expire after 3 hours - no customization available
  • Best for quick, temporary shares when you need fast upload speed
  • No account management or file deletion capabilities

0x0 Usage

  • Without -e flag: Uses 0x0 default expiry (minimum 30 days, maximum 1 year based on file size)
  • With -e flag: Set custom expiry in hours (e.g., -e 24 for 24 hours)
  • Use secret URLs (-S) for sensitive content
  • Keep track of deletion tokens in ~/.0x0_tokens.log

catbox Usage

  • Set up your userhash once: catbox -u your_hash - it's saved permanently
  • Files uploaded with userhash are linked to your catbox account
  • Use catbox -d filename1 filename2 to delete files you've uploaded
  • Anonymous uploads (without userhash) are still permanent but can't be managed

litterbox Usage

  • Script defaults to 72h expiry if no -e flag is specified
  • Use -e flag to customize: 1h, 12h, 24h, or 72h
  • Default 72h expiry is good for most temporary shares
  • Use 1h expiry for sensitive content that should disappear quickly
  • 1 GB file size limit makes it ideal for larger temporary files
  • Same infrastructure as catbox.moe ensures reliability

File Management

  • Keep track of 0x0 deletion tokens in ~/.0x0_tokens.log
  • Use secret URLs (0x0 -S) for sensitive content
  • Set appropriate expiry times based on your needs
  • catbox userhash is saved to ~/.catbox_config for persistence

Performance Tips

  • Install optional dependencies (jq, bat, chafa) for better experience (note: chafa may leave visual artifacts in terminal)
  • Use silent mode (-s) in scripts for cleaner output
  • Organize uploads in dedicated directories for easier browsing
Edit

Pub: 16 Sep 2025 18:44 UTC

Edit: 16 Sep 2025 22:12 UTC

Views: 358