Pull fork or copy the scripts of your choice.
Most of the scripts in this repo work out of the box but can be modified to your liking.
Create a Bash Script: Create a new file with a .sh
extension. For example, clean_desktop.sh
.
(or just copy a file from the repo)
# paste bash code from your script of choice
Make the Script Executable: Open a terminal and run:
chmod +x /path/to/your/clean_desktop.sh
Replace /path/to/your/clean_desktop.sh
with your actual script path.
-
Edit Cron Jobs: Open your crontab for editing:
crontab -e
-
Add Cron Job: Add a line to schedule your Bash script. For example, to run the script every day at 3 AM:
0 3 * * * /path/to/your/clean_desktop.sh
This line specifies the minute (0), hour (3), every day of the month (), every month (), and every day of the week (*).
-
Save and Exit: Save your crontab file and exit the editor.
0 3 * * *
- Every day at 3 AM0 */2 * * *
- Every 2 hours0 0 * * 0
- Every Sunday at midnight*/5 * * * *
- Every 5 minutes
auto-sync is used to sync two folders to be duplicates of one another.
in order to run this at startup on on a CRON schedule read
backup.sh is a bash script that is used to back up a directory of your choice to a destination. the script wil label the backup with a date. so if you run it mor than once it will create a new backup with the new timestamp
if you are looking for continuous back up in a single folder you are looking for auto-sync.sh
clean desktop is a simple script to clean your desktop of standard file extensions. jpg, png, mp4, pdf, etc... will be moved to files of your choosing ( mac standard folders music, pictures, movies, documents recommended )
when first run will create a new directory called desktop2 that will be a sibling of the standard desktop. the script will then move all filed from desktop to desktop2