One of Linux five star things is the cronjobs. They allow you to automatically run stuf (scripts, applications, etc.) at quite specific times. The crontab is the place controlling when the stuff is run and you can list the crontab using the commaand crontab -l for the current user. If you want to edit the crontab, just use the command crontab -e and it launches the crontab in the default editor (set EDITOR env variable to change the editor used).
I’ve been speed optimizing some of my personal sites, and one easy update is changing the images from being JPEGs and PNG images to the smaller WebP format. All the images I need to convert are usually in collections, where one folder at a time needs conversion and as some contain a lot of images, I needed a way to do it smartly. This is what I came up with:
From time to time my Mac is doing stuff which takes quite awhile. Converting images, converting videofiles between formats or other stuff, which may take a long time (but reasonable predictable). In those cases I run a little command in the terminal, to automatically shut down the Mac upon completion: sudo shutdown -h +120 This command sets a timer which shutdown the machine after two hours (the 120 parameters being after 120 minutes).
My little server ran into an issue, and started reporting the error: No space left on device No worries, lest figure out which disk has full and clean up… Using the df command with the -h (for human-readable output) it should be easy to find the issue: root@server:~# df -h Filesystem Size Used Avail Use% Mounted on udev 483M 0 483M 0% /dev tmpfs 100M 3.1M 97M 4% /run /dev/vda 20G 9.
Running a modern IT platform is rarely an easy nor isolated task. Most platforms consist of a fairly large number of components ranging from OS level to 3. party libraries and components added in the user interfacing layers - and adding numerous integrations does make it an interesting challenge to quickly identify and correct bugs and errors. While the system complexity does pose a challenge is surely not an impossible task, as several tools exists for most - if not all - platforms to allow instrumentation of the platform and utilize the instrumentation tools to handle the platform and identify issues quickly.