Linux

Rotate logs manually

Today I had to manually rotate a couple of logs since they had generated a filesize of over 1.8GB of pure text. This was done by issuing the command logrotate /etc/logrotate.d/file_to_be_rotated In my case I had to rotate my firewall log /var/log/firewall described in a custom made file, /etc/logrotate.d/firewall logrotate -v -f /etc/logrotate.d/firewall -v Verbose […]

Read More
Photo etc

Set photo filedate and time according to EXIF info

Sometimes a image files creation date is wrong and have to be corrected. This is a script I use to set a files creation date to the photos date retrieved from EXIF tags. The exiftool program should be available to run this script. #!/usr/bin/env perl use strict; $|++; use Image::ExifTool qw(ImageInfo); use Time::Local; for my […]

Read More