Added example.
This commit is contained in:
parent
bd0c61c18e
commit
527f166506
12
README.md
12
README.md
|
@ -1,11 +1,19 @@
|
|||
# Random Linux Tips (WIP)
|
||||
|
||||
### 0. *Short example template.*
|
||||
- Description: *What is this good for.*
|
||||
- Requires: *Do you need any particular software (provide a link)?*
|
||||
- How-to: *Straight forward description and maybe a code example.*
|
||||
- *Detailled description if necessary.*
|
||||
$ sudo this is the actual code lol
|
||||
- Aditionally: *Anything else that might be important.*
|
||||
|
||||
### 1. Automatically clear cache.
|
||||
- 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).
|
||||
- How-To:
|
||||
- How-to:
|
||||
- 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.
|
||||
- Additionally: This can also be done using regular "rm" instead of "rmtrash".
|
||||
|
||||
|
|
Loading…
Reference in New Issue