A comprehensive collection of shell aliases and functions designed to enhance terminal productivity and streamline common development tasks. Every shortcut works in both Bash (4.0+) and Zsh (5.0+).
- Clone or download this repository:
git clone <repository-url> ~/terminal_shortcuts
# or download and extract to ~/terminal_shortcuts- Add to your shell configuration file (
~/.bashrc,~/.zshrc, etc.):
# Add this line to source all terminal shortcuts
source ~/terminal_shortcuts/shortcuts.sh- Reload your shell or run:
source ~/.bashrc # or ~/.zshrcUse sc command to see all available shortcuts and their descriptions.
Set EXCLUDE_SHORTCUTS to a space-separated list of names before sourcing
shortcuts.sh. Excluded names are never defined, and any alias or function you
already have under that name is left untouched:
export EXCLUDE_SHORTCUTS="p hashit sc"
source ~/terminal_shortcuts/shortcuts.shCore shortcuts rely on standard POSIX tools. Individual functions degrade gracefully and tell you what is missing:
| Tool | Used by |
|---|---|
bc |
calc, log2, pow2, numconv, unitconv |
openssl |
randstr, hashit (password hashes) |
xxd |
strconv hex-decode |
jq or python3 |
jsonpp |
curl |
apitest, isup, myip |
python3 |
all p* Python shortcuts |
zip, unzip, 7z, unrar |
matching compress / extract formats |
exiftool, pdfinfo, mediainfo |
richer meta output |
- Enhanced file listing:
ll,la,lwith colors and details - Smart navigation:
..,...,....for quick directory traversal - Archive operations: Universal
extractandcompressfunctions for any archive type with volume splitting support - File operations: Find files (
ff), find-and-replace (replace), timestamped backups (backup) - Directory creation:
mkcdto create and enter directories - Monitoring:
watchfilefor real-time file monitoring andwatchdirfor directory content monitoring - File viewing:
less(enhanced),le(less),tle(less +G) - File analysis:
metafor comprehensive file type detection and metadata extraction
- Quick git operations:
gs,gc,gp,ga,gaa, etc. - AI-powered commits:
gcmwith GitHub Copilot for intelligent commit messages - Auto-commit:
gacwith intelligent commit messages - Recursive pull:
gpullallpulls every repo under a directory, skipping any that would fail or conflict - Repository info:
gitinfofor comprehensive repo status - Branch management: Simplified checkout and branch creation
- System overview:
sysinfofor comprehensive system details (OS, CPU, memory, GPU, disk) - Process management:
killcmdwith interactive confirmation for killing processes by name - Resource monitoring:
topcpu,topmemfor CPU and memory usage - Time utilities:
now,nowtime,nowdatefor current time/date - History access:
hfor command history,pathfor formatted PATH display - Service management:
sctlstart,sctlstop,sctlrestart,sctlstatusfor systemctl operations - Log monitoring:
sctllogfor service logs,sctlwatchfor real-time log monitoring - Nginx management:
nginxstart,nginxstop,nginxrestart,nginxstatusfor nginx service control - Nginx configuration:
nginxconffor config editing,nginxtestfor syntax validation,nginxreloadfor config reload - Package management:
brewifor Homebrew package installation,brewufor updating and upgrading packages (macOS)
- Website monitoring:
isupto check if websites are accessible - IP information:
myipfor local and external IP addresses - Network monitoring:
portsfor active connections - Enhanced ping: Standard and fast ping options
- Virtual environment:
svenvfor automatic venv activation,cdsvenvfor navigate and activate - Create and bootstrap venv:
cvenvto create .venv with conda's Python, activate it, and upgrade pip - Quick Python access:
palias for python3 - Package management:
pipi,pipu,piplfor pip operations - Dependency analysis:
preqfor analyzing project dependencies and environment - Testing with coverage:
pytestcovfor running tests with coverage reports - Code formatting:
pfmtfor formatting and linting with black, isort, and flake8 - Module execution:
pmfor running Python modules using file paths - Class inspection:
pmemfor displaying members of classes
- Version management:
nu,nl,nifor nvm operations - Quick switching: Easy Node.js version switching
- Config editing:
bashrc,zshrc,vimrcfor instant config file access - Config reloading:
sobashrc,sozshrcfor quick shell configuration reload
- Editor access:
vfor Vim - Source config:
sofor source (reload shell config)
- API testing:
apitestfor quick HTTP API testing with curl - Asset optimization:
optimizeassetsfor minifying JavaScript and CSS files - Hash computation:
hashitfor MD5, SHA1, SHA256, SHA512 hashing of strings, files, or stdin - Password generation:
randstrfor secure random passwords - String/data conversion:
strconvfor converting between hex, base64, and binary formats - Number base conversion:
numconvfor converting numbers between different bases (2-36) with auto-detection - Unit conversion:
unitconvfor converting between different units of measurement - Entropy analysis:
entropyfor calculating Shannon entropy of strings, files, or stdin - Mathematical calculations:
calc,log2, andpow2functions - JSON formatting:
jsonppfor pretty-printing JSON
- Advanced filtering: Filter by length, character types, entropy, regex patterns
- Data processing: Sort, remove duplicates, randomize word order
- Output options: Split by size (MB/GB) or percentage distribution
- Memory efficiency: Streaming processing for large files
- Pattern matching: Case-sensitive/insensitive regex support
- Vim reference:
csvimfor comprehensive Vim usage guide including custom configurations - tmux reference:
cstmuxfor terminal multiplexer usage with sessions, windows, and panes - less reference:
cslessfor file viewer navigation, search, and advanced features - Terminator reference:
csterminatorfor advanced terminal emulator with splits and layouts - Terminal shortcuts:
csterminalfor comprehensive terminal keyboard shortcuts and command line editing
Displays comprehensive system information including:
- OS details and kernel version
- CPU specifications and core count
- Memory usage and availability
- GPU information (NVIDIA, macOS, Linux)
- Disk usage statistics
$ sysinfo
=== SYSTEM INFORMATION ===
OS Information:
Hostname: my-computer
OS: Darwin
Kernel: 21.6.0
...Display all defined functions in the current shell session with optional filtering:
$ list_functions # List all functions
$ list_functions git # List functions containing 'git'
$ list_functions '^c' # List functions starting with 'c'
$ list_functions 'backup|restore' # List functions with 'backup' or 'restore'Features:
- Alphabetically sorted output for easy browsing
- Optional grep pattern filtering for targeted searches
- Includes both built-in shell functions and user-defined functions
- Shows total count of functions found
- Supports regular expressions for advanced filtering
Common Use Cases:
- Explore available functions in your shell environment
- Find functions related to specific tasks (e.g., git, file operations)
- Debug shell configurations by listing loaded functions
- Discover functions from loaded modules and scripts
Interactive process termination by command name:
$ killcmd firefox
=== KILL COMMAND ===
Searching for processes containing: 'firefox'
Found 3 matching process(es):
PID: 1234 - /Applications/Firefox.app/Contents/MacOS/firefox
Kill all these processes? (y/N):Simplified systemd service management:
$ sctlstart nginx # Start nginx service
$ sctlstop apache2 # Stop apache2 service
$ sctlrestart ssh # Restart SSH service
$ sctlstatus postgresql # Check PostgreSQL statusMonitor systemd service logs:
$ sctllog nginx # View nginx service logs
$ sctlwatch apache2 # Watch apache2 logs in real-time๐ธ๏ธ Nginx Management (nginxstart, nginxstop, nginxrestart, nginxstatus, nginxconf, nginxtest, nginxreload)
Complete nginx service control:
$ nginxstart # Start nginx service
$ nginxstop # Stop nginx service
$ nginxrestart # Restart nginx service
$ nginxstatus # Check nginx status
$ nginxconf # Edit nginx configuration
$ nginxtest # Test nginx configuration syntax
$ nginxreload # Reload nginx configurationAutomatically detects and extracts any archive format:
$ extract archive.zip # Extract ZIP file
$ extract data.tar.gz # Extract gzipped tar
$ extract backup.rar # Extract RAR file
$ extract package.7z # Extract 7-Zip fileSupports: .zip, .tar, .tar.gz, .tgz, .tar.bz2, .tbz2, .rar, .7z, .gz, .bz2, .Z.
Create archives with optional volume splitting (--split / -s, sizes in b, k, m, g):
$ compress myfile.zip file1.txt file2.txt # Create ZIP archive
$ compress backup.tar.gz folder/ # Create gzipped tar
$ compress --split 100m data.7z file1 file2 # Create 7z with 100MB volumes
$ compress -s 1g split.zip large_folder/ # Create ZIP with 1GB volumesSupports: .tar.gz, .tgz, .tar.bz2, .tbz2, .tar, .zip, .7z, .gz, .bz2.
Volume splitting is available for every format except .gz and .bz2.
Search for files by name pattern:
$ ff "*.py" # Find all Python files
$ ff "config" # Find files containing "config"
$ ff "test*.js" # Find JavaScript test filesAdvanced text search with regex support. Flags: -r recursive, -i ignore case,
-E extended regex, -z include .gz files. Short flags can be bundled (-riE):
$ search "pattern" file.txt # Basic search (BRE)
$ search -i "case insensitive" notes.txt # Case insensitive
$ search -r "pattern" directory/ # Recursive
$ search -E "^(GET|POST)" access.log # Extended regex
$ search -z "compressed" archive.gz # Search in gzipped files
$ search -rz "exception" logs/ # Recursive, including .gz filesReplace text in strings, files, or stdin. The argument order is
replace <input> <search> <replacement>, and matching is literal, not regex:
$ replace "old text here" "old" "new" # Replace in string
$ replace file.txt "old" "new" # Replace in file (in place)
$ replace file.txt "old" "new" --backup # Replace in file, keeping a backup
$ echo "old text" | replace - "old" "new" # Replace from stdinCreate timestamped backups with optional compression
(--compress <tar.gz|tar.bz2|zip|7z|tar>):
$ backup file.txt # Copy backup: file.txt.backup.20231201_143022
$ backup project/ # Copy backup of a directory
$ backup project/ --compress tar.gz # Compressed backup: project.backup.20231201_143022.tar.gz
$ backup config.ini --compress zip # Compressed single-file backupDisplay comprehensive file type information and extract metadata automatically based on file type:
$ meta photo.jpg # Show image EXIF data, dimensions, camera info
$ meta document.pdf # Show PDF properties, page count, author
$ meta video.mp4 # Show video codec, resolution, duration
$ meta song.mp3 # Show audio metadata, bitrate, artist, album
$ meta archive.zip # Show archive contents and compression info
$ meta script.py # Show text file encoding, line count, word count
$ meta program # Show executable architecture, librariesSupported File Types:
- Images: JPEG, PNG, GIF, TIFF, BMP, WebP - Shows EXIF data, dimensions, camera settings, GPS coordinates
- Documents: PDF, DOC, DOCX - Shows document properties, page count, author, creation date
- Videos: MP4, AVI, MOV, MKV, WebM - Shows duration, resolution, codec info, frame rate, GPS data
- Audio: MP3, WAV, FLAC, OGG, M4A - Shows duration, bitrate, artist, album, genre metadata
- Archives: ZIP, TAR, RAR, 7z - Shows contents list and compression information
- Text files: Shows encoding, line count, word count, character count
- Executables: Shows architecture, linked libraries, file format details
Required Tools (auto-detected):
exiftool- Most comprehensive metadata extraction for images, videos, audiopdfinfo- PDF document information (from poppler-utils)mediainfo- Video and audio file analysisidentify- ImageMagick image information- Standard tools:
file,stat,wc,readelf,ldd
Monitor file changes in real-time (tail -f):
$ watchfile /var/log/nginx/access.log # Monitor nginx access log
$ watchfile app.log # Monitor application logMonitor directory contents for changes:
$ watchdir /home/user/downloads/ # Watch downloads folder
$ watchdir . # Watch current directorySimplified pip operations:
$ pipi requests flask # Install packages
$ pipi requirements.txt # Install from requirements file
$ pipu requests # Upgrade specific package
$ pipu # Upgrade all packages (asks for confirmation)
$ pipu requirements.txt # Upgrade packages from requirements
$ pipl # List installed packagesAutomatically detect and activate Python virtual environments:
$ svenv
Activating virtual environment: .venv/bin/activateChecks .venv/, venv/, env/ and .virtualenv/ first, then falls back to a
depth-limited search for any */bin/activate script.
Navigate to project directory and activate virtual environment. The directory argument is required:
$ cdsvenv ~/myproject # Navigate and activate venv
$ cdsvenv ../other_project # Relative paths work tooCreate .venv using conda's Python, activate it, and upgrade pip:
$ cvenv # Create venv in current directory
$ cvenv myproject # Create venv in myproject/ directoryRun Python modules using file paths:
$ pm script.py # Run script.py as module
$ pm path/to/module.py # Run module with full pathDisplay public members (methods and attributes) of Python built-in classes:
$ pmem str # Show public members of str class
$ pmem -m list # Show magic methods of list class
$ pmem --magic dict # Show magic methods of dict class
$ pmem -a bytearray # Show both public and magic methods
$ pmem --all int # Show both public and magic methods
$ pmem -d str # Show public members with docstrings
$ pmem -ad list # Show all members with docstrings
$ pmem -md dict # Show magic methods with docstrings
$ pmem xmlrpc.client.ServerProxy # Show ServerProxy class members
$ pmem -d urllib.request.Request # Show Request class with docstrings
$ pmem pathlib.Path # Show Path class membersClass Specification:
- Built-in classes: Use simple names like
str,int,list,dict - Module classes: Use dot notation like
xmlrpc.client.ServerProxy,urllib.request.Request
Options:
- Default: Shows public members (methods and attributes that don't start with underscore)
-m, --magic: Shows magic methods (names starting with__)-a, --all: Shows both public and magic methods in separate sections-d, --docs: Shows docstrings for each member (when available)
The function automatically imports required modules when using dot notation, making it easy to explore any Python class without manual imports.
Common Examples:
pmem xmlrpc.client.ServerProxy- XML-RPC client methodspmem urllib.request.Request- HTTP request classpmem pathlib.Path- Modern path handlingpmem json.JSONEncoder- JSON encoding methodspmem sqlite3.Connection- Database connection methods
Analyze Python project dependencies and environment information:
$ preq # Analyze current project dependenciesFeatures:
- Detects and analyzes requirements.txt files
- Shows installed packages matching requirements
- Lists outdated packages with current/latest versions
- Supports Pipenv projects with dependency graphs
- Displays virtual environment disk usage
- Detects Poetry projects in pyproject.toml files
- Shows active virtual environment information
Supported Configuration Files:
requirements.txt- Standard pip requirementsPipfile- Pipenv project dependenciespyproject.toml- Poetry and other modern Python projects
Output Information:
- Installed vs required packages comparison
- Outdated packages that need updates
- Virtual environment size and location
- Dependency graphs for Pipenv projects
- Active environment status
Run Python tests with comprehensive coverage analysis:
$ pytestcov # Test current directory with coverage
$ pytestcov tests/ # Test specific directory
$ pytestcov test_module.py # Test specific file
$ pytestcov tests/ -v # Verbose output
$ pytestcov . --tb=short # Short traceback format
$ pytestcov tests/ -k "unit" # Run only tests matching 'unit'Features:
- Automatic installation of pytest and pytest-cov if missing
- Terminal coverage report with missing lines highlighted
- HTML coverage report with detailed file-by-file analysis
- Test execution statistics and comprehensive reporting
- Supports all standard pytest options and filters
- Generates interactive HTML coverage reports
Generated Output:
- Terminal coverage report with line-by-line analysis
htmlcov/index.html- Interactive HTML coverage report.coverage- Coverage data file for further analysis- Test execution summary with pass/fail statistics
Requirements:
- Python testing environment with write permissions
- Automatic tool installation via pip
Format and lint Python code using industry-standard tools:
$ pfmt # Format current directory
$ pfmt src/ # Format specific directory
$ pfmt module.py # Format specific file
$ pfmt --check # Check formatting without changes
$ pfmt --diff src/ # Show formatting differences
$ pfmt --line-length 100 . # Use custom line lengthTools Integration:
- black - PEP 8 compliant code formatter
- isort - Import statement organizer with black compatibility
- flake8 - Code style checker and linter
Features:
- Automatic tool installation if missing
- Consistent code formatting across entire projects
- Import organization compatible with black formatting
- Configurable line length (default: 88 characters)
- Check and diff modes for CI/CD integration
- Compatible with popular development workflows
Configuration:
- Line length: 88 characters (black default, configurable)
- flake8 ignores: E203 (whitespace before ':'), W503 (line break before operator)
- isort profile: black (ensures compatibility)
- In-place formatting with version control recommended
Options:
--check- Verify formatting without making changes--diff- Show what would be changed without applying--line-length N- Set custom maximum line length
Simplified nvm operations for Node.js version management:
$ nu 18.17.0 # Use Node.js version 18.17.0
$ nu lts # Use latest LTS version
$ nl # List installed Node.js versions
$ ni 20.5.0 # Install Node.js version 20.5.0
$ ni --lts # Install latest LTS versionGet current time and date information:
$ now # Current time and date: 14:30:22 2023-12-01
$ nowtime # Current time only: 14:30:22
$ nowdate # Current date only: 2023-12-01Monitor system resource usage:
$ topcpu # Show top processes by CPU usage
$ topmem # Show top processes by memory usageOutput shows processes sorted by resource consumption with PID, user, and command details.
Check website availability:
$ isup google.com
Checking: http://google.com
โ
Website is UP (HTTP 200 - OK)
$ isup badsite.xyz
Checking: http://badsite.xyz
โ Website is DOWN (connection failed, curl exit code: 6)Show IP address information:
$ myip
=== IP ADDRESS INFORMATION ===
Local IP Addresses:
192.168.1.100
External IP Address:
203.0.113.45
Network Interfaces:
lo
eth0Show active network connections and listening ports:
$ ports # Display all network connections and listening portsShows local/remote addresses, connection states, and associated processes.
Quick Git operations for common workflows:
Automatically stage all changes and generate intelligent commit messages using GitHub Copilot:
$ gcm # Stage all changes and commit with AI-generated messageFeatures:
- Runs
git add -Ato stage all changes - Uses GitHub Copilot CLI to analyze changes and generate meaningful commit messages
- Interactive workflow with Copilot for best commit message quality
Requirements:
- GitHub Copilot CLI installed:
npm install -g @githubnext/github-copilot-cli - Authenticated with GitHub Copilot
Common Git shortcuts for faster workflows:
$ gs # Git status
$ ga file.txt # Git add specific file
$ gaa # Git add all files (git add -A)
$ gc "commit message" # Git commit with message
$ gp # Git push
$ gu # Git pull
$ gb # Git branch
$ gco branch-name # Git checkout branch
$ gcb new-branch # Git checkout new branch
$ gl # Git log one line
$ gd # Git diff
$ gdc # Git diff cached
$ gr file.txt # Git remove from cacheQuick commit with auto-generated message:
$ gac # Add all files and commit with auto messageAutomatically generates commit message based on number of files changed.
Recursively find every Git repository under a directory and run git pull,
but only where it is safe to do so:
$ gpullall # Pull every repo under the current directory
$ gpullall ~/Projects # Pull every repo under ~/ProjectsA repository is skipped (not failed) when:
- the working tree has uncommitted changes (including unresolved merges),
- the current branch has no upstream configured, or
- merging the fetched upstream into
HEADwould produce a conflict (detected up-front withgit merge-tree, before the pull runs).
Output is one block per repo followed by a summary of how many were pulled,
skipped, and failed. Exits non-zero only if any fetch/pull actually
errored โ a skipped repo is not a failure.
Display comprehensive Git repository status:
$ gitinfo
=== GIT REPOSITORY INFO ===
Current branch: main
Repository: myproject
Last commit: a1b2c3d - Fix bug in authentication (2 hours ago)
Status:
Working tree clean - no changes to commitInstantly open configuration files for editing:
$ bashrc # Edit ~/.bashrc
$ zshrc # Edit ~/.zshrc
$ vimrc # Edit ~/.vimrc
$ nginxconf # Edit /etc/nginx/nginx.confQuickly reload shell configurations:
$ sobashrc # Reload ~/.bashrc
$ sozshrc # Reload ~/.zshrcQuick directory traversal shortcuts:
$ .. # Go up one directory (cd ..)
$ ... # Go up two directories (cd ../..)
$ .... # Go up three directories (cd ../../..)
$ ~ # Go to home directory (cd ~)Create directory and navigate into it in one command:
$ mkcd new_project # Create and enter new_project directory
$ mkcd path/to/deep/dir # Create nested directories and navigateEnhanced directory listing with different detail levels:
$ ll # Detailed list with human-readable sizes (ls -lh)
$ la # List all files including hidden (ls -la)
$ l # Compact column format (ls -CF)Improved file viewing with enhanced less functionality:
$ less file.txt # Enhanced less (less -RMNi --use-color)
$ le file.txt # Alias for less
$ tle file.txt # Open file with less, start at end (+G)Flags used: -R raw colour escapes, -M verbose prompt, -N line numbers,
-i case-insensitive search, --use-color colourised output (requires less 580+).
Format and display the system PATH variable:
$ path # Display PATH with each directory on separate lineQuick access to command history:
$ h # Display command history
$ h | grep pattern # Search history for a patternQuick tmux session attachment:
$ ta session_name # Attach to named tmux sessionQuick HTTP API testing tool using curl with automatic formatting and timing:
$ apitest localhost:3000/api/users # GET request
$ apitest api.example.com/data GET # Explicit GET
$ apitest localhost/api/users POST '{"name":"John"}' # POST with data
$ apitest api.site.com/users/1 PUT '{"age":25}' # PUT request
$ apitest localhost:8080/api/users/1 DELETE # DELETE request
$ apitest https://api.github.com/users/octocat # External APIFeatures:
- Automatic Content-Type and Accept headers for JSON
- Response time measurement and HTTP status code display
- Support for GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS methods
- Automatic protocol detection (adds http:// if missing)
- Pretty formatted output with response information
- Error handling with helpful troubleshooting tips
Response Information:
- HTTP status code
- Response time in seconds
- Response size in bytes
- Complete response body
Optimize web assets by minifying JavaScript and CSS files:
$ optimizeassets # Optimize current directory
$ optimizeassets ./src/assets # Optimize specific directory
$ optimizeassets /path/to/project # Optimize project directory
$ optimizeassets ../public # Optimize relative pathFeatures:
- Automatic minification of JavaScript files using UglifyJS
- Automatic minification of CSS files using clean-css
- Preserves original files while creating .min.js and .min.css versions
- Skips already minified files and node_modules directories
- Automatic tool installation via npm if not present
- File size reduction reporting with percentage savings
- Smart file timestamp checking to avoid unnecessary reprocessing
Requirements:
- Node.js and npm installed
- Write permissions in target directory
- npm global install permissions (for tool installation)
Output Information:
- Progress reporting for each processed file
- File size reduction percentages
- Summary of processed files and any errors
- Skips files that are already up to date
Supported File Types:
- JavaScript:
.jsfiles (creates.min.js) - CSS:
.cssfiles (creates.min.css) - Automatically excludes already minified files (
.min.js,.min.css)
Compute various hash functions for strings, files, or stdin. Supports both simple cryptographic hashes and secure password hashes:
Simple Hash Functions:
$ hashit sha256 "hello world" # Hash a string: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
$ hashit md5 myfile.txt # Hash a file: 5d41402abc4b2a76b9719d911017c592
$ echo "data" | hashit sha1 - # Hash stdin: a17c9aaa61e80a1bf71d0d850af4e5baa9800bbd
$ hashit blake2 "secret data" # BLAKE2 hash (modern, fast algorithm)
$ hashit crc32 "integrity check" # CRC32 checksum: 3632233996Password Hash Functions (with salt):
$ hashit bcrypt "password123" # Bcrypt hash: $2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewdBXFhAsC/HjBKS
$ hashit argon2 "password123" # Argon2id hash: $argon2id$v=19$m=4096,t=3,p=1$salt$hash
$ hashit sha256crypt "password" # SHA-256 crypt: $5$saltvalue$hashvalue
$ hashit sha512crypt "password" # SHA-512 crypt: $6$saltvalue$hashvalue
$ echo "mypassword" | hashit bcrypt - # Hash password from stdinSupported Hash Types:
- Simple hashes:
md5,sha1,sha224,sha256,sha384,sha512,blake2,sha3,crc32 - Password hashes:
bcrypt,argon2,sha256crypt,sha512crypt
Password hashes automatically include random salt and produce different outputs each time for security.
Calculate Shannon entropy for strings, files, or stdin to measure randomness/complexity:
$ entropy "hello world" # Calculate entropy of string
$ entropy passwords.txt # Calculate entropy of file contents
$ echo "random data" | entropy - # Calculate entropy of stdinEntropy values range from 0 (completely predictable) to ~8 (maximum randomness for byte data).
Convert between different data encodings and representations:
$ strconv hex "hello" # Encode to hex: 68656c6c6f
$ strconv hex-decode "68656c6c6f" # Decode hex: hello
$ strconv base64 "hello world" # Encode to Base64: aGVsbG8gd29ybGQ=
$ strconv b64-d "aGVsbG8gd29ybGQ=" # Decode Base64: hello world
$ strconv bin 255 # Integer to binary: 11111111
$ strconv bin "A" # String to binary: 01000001
$ echo "data" | strconv hex - # Encode stdin to hex
$ cat file.txt | strconv base64 - # Encode file to Base64Supports:
- Hexadecimal:
hex(encode),hex-decode/hex-d(decode) - Base64:
base64/b64(encode),base64-decode/b64-d(decode) - Binary:
bin/binary(integers to binary numbers, strings to ASCII binary)
Convert numbers between different bases (2-36). The signature is
numconv <number|range> [target_base] [source_base]; the source base is
auto-detected from a 0x, 0b or leading-0 prefix when omitted, and the
target base defaults to decimal:
$ numconv 255 # Decimal in, decimal out: 255
$ numconv 0xff # Hex in, decimal out: 255
$ numconv 0b1010 # Binary in, decimal out: 10
$ numconv 255 hex # Decimal to hex: FF
$ numconv 255 bin # Decimal to binary: 11111111
$ numconv 255 16 # Same, using the numeric base: FF
$ numconv 377 hex 8 # Octal 377 to hex: FF
$ numconv 1000 36 # Decimal to base 36: RSRange conversion (convert multiple consecutive numbers):
$ numconv 100-110 hex # Convert 100-110 to hex: 64, 65, 66, ..., 6E
$ numconv 0x10-0x1F dec # Convert hex 10-1F to decimal: 16, 17, ..., 31
$ numconv 8-12 bin # Convert 8-12 to binary: 1000, 1001, ..., 1100
$ numconv 250-255 hex # Convert 250-255 to hex: FA, FB, FC, FD, FE, FFRange format supports the same base auto-detection and supports up to 1000 numbers per range.
Convert between different units of measurement across multiple categories:
$ unitconv 100 cm m # Convert 100 cm to meters: 1
$ unitconv 32 f c # Convert 32ยฐF to Celsius: 0
$ unitconv 1 km mi # Convert 1 km to miles: 0.621371
$ unitconv 1000 g kg # Convert 1000g to kg: 1
$ unitconv 1 gb mb # Convert 1 GB to MB: 1000
$ unitconv 24 h min # Convert 24 hours to minutes: 1440
$ unitconv 1 m2 ft2 # Convert 1 mยฒ to ftยฒ: 10.7639
$ unitconv 1 l ml # Convert 1 liter to ml: 1000Supported Categories:
Length Units:
- Metric:
mm,cm,m,km,nm,um - Imperial:
in,ft,yd,mi,mil
Weight/Mass Units:
- Metric:
mg,g,kg,t - Imperial:
oz,lb,st,ton
Temperature Units:
c(Celsius),f(Fahrenheit),k(Kelvin)
Volume Units:
- Metric:
ml,l - Imperial:
gal,qt,pt,cup,fl_oz,tsp,tbsp
Area Units:
- Metric:
mm2,cm2,m2,km2,ha - Imperial:
in2,ft2,yd2,mi2,acre
Time Units:
ms,s,min,h,d,w,mo,y
Data/Storage Units:
- Decimal:
b,kb,mb,gb,tb,pb - Binary:
kib,mib,gib,tib,pib
Features:
- Case-insensitive unit names
- High precision calculations using bc
- Automatic decimal cleanup for clean output
- Cross-category conversion prevention
- Comprehensive error handling and validation
Generate secure random strings from openssl rand (Base64 alphabet: A-Z a-z 0-9 + /).
The default length is 16 characters:
$ randstr # Generate 16-character string: kR3xPq7Za1MvBn8W
$ randstr 32 # Generate 32-character string
$ randstr 64 # Generate 64-character stringCalculator (calc): results are printed with 3 decimal places. Available
functions: sqrt, sin, cos, tan, atan, ln, log (base 10), exp;
constants pi and e.
$ calc "2 + 3 * 4" # Result: 14
$ calc "sqrt(16)" # Result: 4.000
$ calc "sin(pi/2)" # Result: 1.000
$ calc "log(100)" # Result: 2.000 (base 10)Base-2 Logarithm (log2): results are printed with 6 decimal places.
$ log2 8 # Result: 3.000000 (since 2ยณ = 8)
$ log2 1024 # Result: 10.000000 (since 2ยนโฐ = 1024)Powers of 2 (pow2):
$ pow2 3 # Result: 8 (2ยณ)
$ pow2 10 # Result: 1024 (2ยนโฐ)Format and pretty-print JSON data:
$ jsonpp data.json # Pretty-print JSON file
$ echo '{"a":1,"b":2}' | jsonpp - # Pretty-print JSON from stdinAdvanced wordlist filtering and processing. Run wordlist --help for the full
option list:
$ wordlist -min 8 -max 12 passwords.txt # Filter by length 8-12 characters
$ wordlist -regex "^[a-z]+$" words.txt # Keep only lowercase words
$ wordlist -notregex "[0-9]" words.txt # Exclude words containing digits
$ wordlist -i -regex "PASS" words.txt # Case-insensitive regex
$ wordlist -minentropy 4.0 entropy.txt # Filter by minimum entropy
$ wordlist -minnum 2 -minspecial 1 passwords.txt # Filter by character classes
$ wordlist -su words.txt # Sort and remove duplicates
$ wordlist -r -o random.txt words.txt # Randomize word order
$ wordlist -split 100MB -o parts.txt large.txt # Split into 100MB files
$ wordlist -splitpct "30 30 40" -o parts.txt in.txt # Split by percentage
$ cat passwords.txt | wordlist -su - # Read from stdinOptions:
| Option | Effect |
|---|---|
-s / -u / -su |
Sort / deduplicate / both |
-r |
Randomize word order |
-i / -I |
Case-insensitive / case-sensitive regex (default -I) |
-min N / -max N |
Word length bounds |
-minentropy E / -maxentropy E |
Shannon entropy bounds |
-minnum / -maxnum |
Count of digits |
-minlower / -maxlower |
Count of lowercase letters |
-minupper / -maxupper |
Count of uppercase letters |
-minspecial / -maxspecial |
Count of special characters |
-regex P / -notregex P |
Keep / exclude words matching a pattern |
-keepws / -removews |
Keep only / drop words containing whitespace |
-o FILE |
Write to a file instead of stdout |
-split SIZE |
Split output into SIZE chunks (requires -o) |
-splitpct "X Y Z" |
Split output by percentage, must sum to 100 (requires -o) |
Comprehensive Vim cheatsheet covering:
- Basic usage and modes (normal, insert, visual)
- Navigation commands and movement
- Editing operations (cut, copy, paste, undo/redo)
- Search and replace functionality
- File operations and buffer management
- Window splits and tab management
- Folding operations
- Custom leader key mappings (Leader = )
- Plugin shortcuts (NERDTree, Tagbar, ALE)
- Autoclose features for quotes and brackets
- Advanced tips and configuration features
$ csvim
=== VIM CHEATSHEET ===
๐ BASIC USAGE:
vim [file] - Open file in vim
vim +[line] - Open file at specific line
...Comprehensive tmux cheatsheet covering:
- Session management (create, attach, detach, list)
- Window operations (create, switch, rename, close)
- Pane management (split, navigate, resize, zoom)
- Copy mode and text selection
- Key bindings and prefix commands
- Configuration tips and common settings
- Workflow examples and best practices
$ cstmux
=== TMUX CHEATSHEET ===
๐ BASIC USAGE:
tmux - Start new session
tmux new -s name - Start new session with name
tmux attach -t name - Attach to named session
...Comprehensive less cheatsheet covering:
- Basic file viewing and navigation
- Forward and backward movement (screens, lines, half-screens)
- Search functionality (forward, backward, filtering)
- Marks and position management
- File operations and multiple file handling
- Display options and customization
- Color and highlighting features
- Horizontal scrolling for long lines
- Command-line options and environment variables
- Advanced search with regular expressions
- Common workflows and pro tips
$ csless
=== LESS CHEATSHEET ===
๐ BASIC USAGE:
less file.txt - Open file with less
cat file | less - Pipe output to less
less +G file.txt - Open file at end
...Comprehensive Terminator cheatsheet covering:
- Window and terminal management
- Terminal splitting (horizontal and vertical)
- Tab management and navigation
- Terminal resizing and arrangement
- Search and find functionality
- Copy, paste, and text selection
- Display options and zoom controls
- Profiles and layout management
- Broadcasting and terminal grouping
- Configuration file examples
- Command-line options and startup
- Plugin system and customization
- Common workflows and tips
$ csterminator
=== TERMINATOR CHEATSHEET ===
๐ BASIC USAGE:
terminator - Start Terminator
terminator -l layout - Start with specific layout
terminator -x command - Execute command in new window
...Comprehensive terminal keyboard shortcuts cheatsheet covering:
- Cursor movement and navigation within command line
- Text cutting, deleting, and pasting operations
- Command history search and navigation
- Tab completion and text expansion
- Process control signals (Ctrl+c, Ctrl+z, etc.)
- Display and terminal control commands
- Advanced command line editing features
- ZSH-specific shortcuts and enhancements
- Argument manipulation and word operations
- Advanced shortcuts for power users
- Background process management (jobs, fg, bg)
- Workflow examples and practical tips
- Key binding customization guidance
$ csterminal
=== TERMINAL CHEATSHEET (BASH/ZSH) ===
๐ CURSOR MOVEMENT:
Ctrl+a - Move to beginning of line
Ctrl+e - Move to end of line
Alt+f - Move forward one word
...MIT License.