A comprehensive command-line file management Swiss Army knife that combines file operations, text processing, log analysis, and backup functionality into a single powerful tool.
- Copy files - Simple and reliable file copying
- Search files - Find file within a directory
- File information - Display detailed file metadata (size, permissions, modification time)
- Extract patterns - Filter lines matching specific patterns
- Find and replace - Bulk text replacement within files
- Text statistics - Count lines, words, and characters
- Error filtering - Extract only error lines from log files
- Log statistics - Generate comprehensive log analytics (totals, errors, warnings)
- Directory backup - Create compressed backups with timestamping
- Backup restoration - Easy restoration from backup archives
- Exclusion support - Exclude specific file patterns from backups
- GCC compiler
- Standard C library
- Tar utility (for backup functionality)
gcc -Wall -O2 -o filemaster filemaster.c./filemaster [command] [options] [arguments]# Copy a file
./filemaster -copy source.txt destination.txt
./filemaster -cp source.txt destination.txt
# Get file information
./filemaster -info document.pdf
./filemaster -i document.pdf
# Search for files by pattern
./filemaster -search /home/user "*.txt"
./filemaster -s /home/user "*.txt"# Extract lines containing a pattern
./filemaster -extract logfile.log "ERROR"
./filemaster -x logfile.log "ERROR"
# Replace text in a file
./filemaster -replace config.txt "old_value" "new_value"
./filemaster -r config.txt "old_value" "new_value"
# Count lines, words, and characters
./filemaster -count document.txt
./filemaster -c document.txt# Create a backup of a directory
./filemaster -backup /path/to/source /path/to/backup/location
./filemaster -b /path/to/source /path/to/backup/location
# Restore from a backup
./filemaster -restore backup.tar.gz /path/to/restore/location
./filemaster -rs backup.tar.gz /path/to/restore/location| Command | Alias | Parameters | Description |
|---|---|---|---|
-copy |
-cp |
<src> <dest> |
Copy file |
-info |
-i |
<file> |
Show file information |
-search |
-s |
<dir> <pattern> |
Search files in directory matching pattern |
-extract |
-x |
<file> <pattern> |
Extract lines containing pattern |
-replace |
-r |
<file> <old> <new> |
Replace text in file |
-count |
-c |
<file> |
Count lines, words, characters |
-backup |
-b |
<src> <dest> |
Create backup |
-restore |
-rs |
<backup> <dest> |
Restore from backup |
- ✅ Linux
- ✅ macOS
- ✅ BSD systems
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Current version: 1.0.0
FileMaster - Your all-in-one file management Swiss Army knife! 🔧📁