Delete files older than x days
find /data/folder -type f -ctime +60 -exec /bin/rm {} \;
A chronological documentation test project, nothing serious, really!
find /data/folder -type f -ctime +60 -exec /bin/rm {} \;
Dovecot og Courier-imap klager til tider på at sertifikat ikke fungerer. Da kan man kjøre følgende kommando for å lage nytt sertifikat. Kommandoen kjøres fra /etc/ssl/dovecot/ openssl req -new -x509 -nodes -days 365 -out cert.crt -keyout cert.key cat cert.key cert.crt > cert.pem Endre navnet på filene slik at de stemmer overns med configfilene til de […]
When I need to transfer lots of files or directories between computers, I usually use tar and ssh together. Last time I used it however, I realized that perhaps not everyone knows how to do this. The procedure is very simple, and a full command could look something like this: tar -cf – directory/ | […]
I’ve just migrated a couple of servers from Courier-IMAP to Dovecot, and am very happy with the latter so far. I thought I’d share the courier2dovecot shell script I whipped together (based on the instructions I found in the migration how-to), for converting Courier-IMAP maildirs to Dovecot format. While the script is rather simple, it […]
This is my version of the shell script “Shell scripts for archiving digital photos in directories by date“. It utilizes the exiftags command available in most linux distributions like Gentoo and debian Linux. Though the metacam program is also usefull since it can read Nikon NEF-files.Here’s an example of a directory tree they create: 2006 […]