Formatting

This commit is contained in:
proledatarian 2022-02-05 12:18:32 +00:00
parent 5ce4029ea8
commit 6617f80795
1 changed files with 7 additions and 7 deletions

View File

@ -1,10 +1,10 @@
# Random Linux Tips # Random Linux Tips
## 1. Automatically clear cache. ## 1. Automatically clear cache.
Description: Move files older than a specific amount of time from your user's ~/.cache directory to the trash. - Description: Move files older than a specific amount of time from your user's ~/.cache directory to the trash.
Requires: (https://github.com/PhrozenByte/rmtrash)[rmtrash]. - Requires: (https://github.com/PhrozenByte/rmtrash)[rmtrash].
How-To: - How-To:
- Add the following line to your crontab using the command "crontab -e" (or EDITOR=$editor crontab -e) -- Add the following line to your crontab using the command "crontab -e" (or EDITOR=$editor crontab -e)
# 0 17 * * * /usr/bin/find ~/.cache/* -mtime +7 -exec /usr/bin/rmtrash -rf {} \; 0 17 * * * /usr/bin/find ~/.cache/* -mtime +7 -exec /usr/bin/rmtrash -rf {} \;
- This command looks at files in ~/.cache every day at 5 p.m. and moves files older than 7 days to the trash. -- This command looks at files in ~/.cache every day at 5 p.m. and moves files older than 7 days to the trash.
Additionally: This can also be done using regular "rm" instead of "rmtrash". -Additionally: This can also be done using regular "rm" instead of "rmtrash".