Have you ever wished to have a tool like WinDirStat, SequoiaView, SpaceSniffer, TreeSize or similar for the linux console? ncdu to the rescue!
Sometimes I have to delete files before or after a specific date. Here is a one liner to do this:
I recently noticed that my spamassassin bayes filter doesn’t seem to work. And this is even though I run a script, that uses sa-learn to learn ham and spam tokens daily. Looking at the header of SPAM mail, I often…
Since some of the websites I host on my vServer need a PHP version > 5.3 I had to setup an environment that allows to choose PHP version seperately for every vHost. The following steps did the trick for me on…
Today I had to duplicate a record in a MySQL database. Of course the primary key (which is AUTO_INCREMENT in my case) has to be unique. This is what I came up with:
Sometimes you may want to change the output language of commands. E.g. if you have to google for error messages or need the output for further use in scripts.
Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with lsblk which has the advantage that it doesn’t need root permission:
Sometimes one needs to know the exact capacity of a drive (e.g. for bash scripts). Here is a one liner for this with fdisk:
Today I had to import a large amount of SQL data into an existing database. In detail I needed to import the latest ip2nation data into my wordpress database. Because the file has a lot of records managing the import…
Sometimes you just want to know the name and version of the linux distribution you are currently working on (very useful when working on many different systems or if you are logged in a customers system). Well, to find out…