Scripting
Read More
Cronjobb som sletter gamle filer
find /data/folder -type f -uid 400 -atime +2 -exec /bin/rm {} ; find /data/folder -type d -uid 400 -atime +2 | sort -r | /usr/bin/perl -e ‘foreach (<>) {chop; rmdir;
A chronological documentation test project, nothing serious, really!
find /data/folder -type f -uid 400 -atime +2 -exec /bin/rm {} ; find /data/folder -type d -uid 400 -atime +2 | sort -r | /usr/bin/perl -e ‘foreach (<>) {chop; rmdir;
awk -F ” ” ‘{print $22 ” “$23}’ /var/log/mail.log|grep @pario|sort|uniq awk -F ” ” betyr at separator i fila er mellomrom (” “).