A small collection of command-line tools I wrote from scratch while learning shell scripting and Linux fundamentals. Each script solves a real task and was built to practice argument handling, input validation, and clean shell code.
Takes a directory and reports its five most common file extensions, ranked by how many files use each one. Useful for quickly understanding what a directory is mostly made of.
Usage:
./investigate.sh <directory>Example:
./investigate.sh ~/DownloadsIt validates that the argument is a real directory before running, and prints a clear message otherwise.
Creates a compressed .tar.gz backup of a directory and verifies its
integrity right after creating it. The archive is named with the directory
name and the current date (for example, backup_projects_2026-07-14.tar.gz)
and saved to ~/dev/backups/.
After creating the archive, the script reads it back to confirm it is valid and not corrupted, reporting whether the backup was verified successfully.
Usage:
./backupgz.sh <directory>Example:
./backupgz.sh ~/projectsIt validates that the argument is a real directory before running, and creates the backups folder automatically if it does not exist.
- A Unix-like environment (Linux, macOS, or WSL on Windows)
- Bash
- Standard GNU utilities:
find,grep,sed,sort,uniq(forinvestigate.sh) andtar,gzip(forbackupgz.sh)
Make a script executable before running it:
chmod +x backupgz.sh
./backupgz.sh <directory>These scripts were written as part of my journey learning software engineering, with a focus on backend and systems. They prioritize correctness and clear error handling. Feedback is welcome.