A collection of lightweight, single-purpose Bash utility scripts to simplify system administration.
| Script Name | Description |
|---|---|
find_old_files.sh |
Locates or deletes files that haven't been modified since a configurable time. |
Scans a targeted directory for files exceeding a specific modification age. By default, it runs safely in verification mode, but it can purge files instantly when triggered with the delete flag.
-a/--age: The modification age threshold in days (e.g.,180for 6 months). Defaults to365days.-d/--delete: Switches the script from scan/verification mode to active deletion mode.[path]: The target directory path (positional argument). Defaults to the current directory (.) if omitted.
Scan the current directory for files older than a year:
./find_old_files.sh
Scan a specific folder for files older than 6 months (180 days):
./find_old_files.sh /path/to/folder --age 180
Delete files older than 30 days:
./find_old_files.sh /path/to/folder --age 30 --delete
To keep things clean as this repo grows, stick to this simple layout for any new script:
- Add a single line for the script to the Scripts Overview index table.
- Create a clean section with a brief description.
- List the flags and a few real-world examples.
- KISS: No walls of text, no unnecessary fluff.