Tag Archives: Linux

Shell – Redirect output to file with datetime as filename

This is an example shell script which creates a file with datetime as filename.
eureka.sh

#!/bin/bash

echo "Eureka!" > eureka.$(date '+%Y-%m-%d').txt

 

The file is created.
shell-script-datetime-as-filename
 

Done =)

Reference: StackOverflow – linux redirector to log filename with $date variable

About these ads

Ubuntu – Recover package configuration file using apt-get

Previously i have setup a server with Nginx and MariaDB.
Run Drupal 7 in Nginx

But there is one problem in this setup. I cannot restart the MariaDB service. Whenever it is down, i have to restart the server instance.

At first, i thought the failure is caused by the modification of the /etc/mysql/my.cnf. So i try to restore the original my.cnf. The following solution helps you to restore the default package configuration file.
Continue reading

MyUnity – Extra theme settings for Ubuntu

If you like to have more customization options on the display of your Ubuntu, MyUnity will be one of you favourite application.

Browse the following link to install MyUnity.

apt://myunity

With MyUnity, you can customize the launcher which is located on the left hand side. You can even configure the settings of the Dash Home as well as the fonts.
Continue reading