add script and crontab

This commit is contained in:
piccihud 2023-02-10 21:37:23 +01:00
parent 92922be075
commit 555343d6b7
1 changed files with 23 additions and 0 deletions

View File

@ -30,3 +30,26 @@ Ricordarsi di impostare una password per il nuovo utente, altrimenti non potrà
```bash
passwd $user
```
## Crontab
```bash
#.---------------- [m]inute: minuto (0 - 59)
#| .------------- [h]our: ora (0 - 23)
#| | .---------- [d]ay [o]f [m]onth: giorno del mese (1 - 31)
#| | | .------- [mon]th: mese (1 - 12) OPPURE jan,feb,mar,apr...
#| | | | .---- [d]ay [o]f [w]eek: giorno della settimana (0 - 7) (la domenica vale 0 o 7) OPPURE sun,mon,tue,wed,thu,fri,sat
#| | | | |
#
#* * * * * comando da eseguire
0 21,22 * * * pg_dump cinema > ~/Databases/filmdb.sql
0 9,15,20 * * * nice -n 19 clamscan -ir /$HOME --log=clamavlog.txt --move=/$HOME/quarantine/ 2>&1
0 9,15,20,22 * * * /usr/bin/rsync -az --delete --exclude=Nextcloud ~/ /media/davide/Backup/Desktop/ && date >> ~/backup.log
```
## SQL to Markdown
```bash
awk -F "\t" '{print $1"\t"$2"\t"$4"\t"$3}' file.sql | sort --field-separator='|' -s -k 4 >> file.md
```