Linux Commands Reference - Complete Linux Command Guide
Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.
printf
Format and print text
Syntax
printf FORMAT [ARGUMENT]...Common Options
%sString%dDecimal integer%fFloating point number%xHexadecimal number%oOctal number%cSingle character%-10sLeft-align, 10 chars wide%05dZero-padded 5-digit numberCommon Examples
printf "Name: %s\n" "Alice"Format string
printf "%-10s %5d\n" "Alice" 100Aligned output
printf "Hex: %x\n" 255Decimal to hex
printf "Pi: %.2f\n" 3.14159Round to 2 decimals
printf "%05d\n" 42Zero-pad number
printf "%s,%s,%s\n" a b cMulti-argument format
printf "%.1f%%\n" 85.5Print percentage
printf "%b" "hello\nworld"Interpret escape sequences
Related Tools
More Code & Dev Tools
XML Formatter
Format and minify XML online. Beautify XML code or compress ...
Code Analyzer
Analyze code quality online. Check for errors, warnings, and...
JavaScript Formatter
Format and beautify JavaScript code online. Improve code rea...
Code Share
Create and share code snippets online. Syntax highlighting a...
Code Formatter
Format and beautify code online. Support multiple languages ...
API Tester
Test HTTP APIs online with support for GET, POST, PUT, DELET...
Git Cheatsheet
Quick reference for common Git commands. Search, copy, and u...
Cron Expression Generator
Generate and validate Cron expressions online. Convert Cron ...
HTML Formatter
Format and minify HTML online. Beautify HTML code or compres...
Port Checker
Check if a port is open online. Test port availability and c...
Regex Cheatsheet
Quick reference for regular expression patterns. Character c...
WebSocket Tester
Test WebSocket connections and messages in real-time. Connec...