Vacuum is a powerful command-line tool designed to help you efficiently move old files from a source directory (source
) to a designated target directory (target
). It offers various customizable options to suit your archiving needs.
- File Archiving: Seamlessly moves files from your source to target directories.
- Customizable Parameters: Define file age, subdirectory inclusion, and more.
- Dry Run Option: Safely preview actions before executing them.
- Optional Shredding: Securely delete original files post-transfer if required.
vacuum -source=<source directory> -target=<target directory> -age=<age in years> [options]
Example:
vacuum -source=/home/user/documents -target=/archive/documents -age=5 -shred
Flag | Description |
---|---|
-source |
Path to the source directory from which files will be moved. |
-target |
Path to the target directory where files will be archived. |
-dry |
Perform a dry run without executing any file operations. |
-shred |
Delete the original file after copying it to the target directory. |
-recurse |
Recursively include all subdirectories. |
-age |
Minimum file age in years to consider for archiving. |
-
Dry Run: Simulate the process without moving any files.
vacuum -source=/path/to/source -target=/path/to/target -age=1 -dry
-
Archiving Files Older than 5 Years:
vacuum -source=/path/to/source -target=/path/to/target -age=5
-
Move and Shred: Archive and securely delete original files.
vacuum -source=/path/to/source -target=/path/to/target -age=3 -shred
-
Recursively Include Subdirectories:
vacuum -source=/path/to/source -target=/path/to/target -age=1 -recurse
- Dry Run: Highly recommended to use the
-dry
flag before performing actual file operations to ensure everything works as expected. - File Shredding: If the
-shred
flag is used, files will be permanently deleted from the source directory after transfer. This action cannot be undone. - Recursive Option: The
-recurse
flag enables processing of subdirectories.
This project is licensed under the BSD-3-Clause License. See the LICENSE file for more details.
Feel free to submit issues or pull requests. Contributions are always welcome!