Created
December 20, 2019 07:32
-
-
Save mezerotm/a5f614be8622df64e1591e8f87382d0b to your computer and use it in GitHub Desktop.
The `tmp` script belongs in the `reboot` folder and is used to delete temporary files, Set browsers and other programs to automatically place files in the tmp folder to not manage manual deletion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this file to introduce tasks to be run by cron. | |
# | |
# Each task to run has to be defined through a single line | |
# indicating with different fields when the task will be run | |
# and what command to run for the task | |
# | |
# To define the time you can provide concrete values for | |
# minute (m), hour (h), day of month (dom), month (mon), | |
# and day of week (dow) or use '*' in these fields (for 'any').# | |
# Notice that tasks will be started based on the cron's system | |
# daemon's notion of time and timezones. | |
# | |
# Output of the crontab jobs (including errors) is sent through | |
# email to the user the crontab file belongs to (unless redirected). | |
# | |
# For example, you can run a backup of all your user accounts | |
# at 5 a.m every week with: | |
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ | |
# | |
# For more information see the manual pages of crontab(5) and cron(8) | |
# | |
# m h dom mon dow command | |
@reboot run-parts ~/.config/cron.d/reboot | |
@hourly run-parts ~/.config/cron.d/hourly | |
@daily run-parts ~/.config/cron.d/daily | |
@weekly run-parts ~/.config/cron.d/monthly | |
@monthly run-parts ~/.config/cron.d/monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ ! -d ~/Downloads/tmp ]; then | |
/bin/mkdir -p ~/Downloads/tmp/ | |
fi | |
/bin/rm -rf ~/Downloads/tmp/* | |
if [ ! -d ~/Pictures/tmp ]; then | |
/bin/mkdir -p ~/Pictures/tmp/ | |
fi | |
/bin/rm -rf ~/Pictures/tmp/* | |
if [ ! -d ~/Videos/tmp ]; then | |
/bin/mkdir -p ~/Videos/tmp/ | |
fi | |
/bin/rm -rf ~/Videos/tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment