https://github.com/maybethisisru/keep-clean
https://github.com/maybethisisru/keep-clean
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maybethisisru/keep-clean
- Owner: MaybeThisIsRu
- License: mit
- Created: 2021-05-13T04:06:45.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-13T04:07:00.000Z (about 5 years ago)
- Last Synced: 2025-07-02T04:55:59.669Z (12 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keep-clean
A bash script I use to watch for certain file extensions and move them from the Downloads directory to the appropriate home directory (Documents/Pictures/Videos).
## Dependencies
- `inotify-tools`
- On Ubuntu and its derivatives: `sudo apt install inotify-tools`
- `rsync` to move files and delete the source after
## Usage
- The bash script is available as `clean.sh`. Copy it wherever you'd like to keep the script.
- A systemd unit configuration file, `clean-docs.service`, is also available. This must be copied to `/etc/systemd/system/clean-docs.service`. Configure the service environment variables to move different file extensions to different directories (`source`, `destination`, `look_for`).
- Each configuration set can be a new `.service` file.
- Since we have added or edited a service file, reload systemctl: `systemctl daemon-reload`
- _Enable_ the service to start on login automatically: `systemctl enable clean-docs`
- Start now with `systemctl start clean-docs`.
- Check logs (and test) with `journalctl -u clean-docs --follow`