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
Done =)
Reference: StackOverflow – linux redirector to log filename with $date variable
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
Done =)
Reference: StackOverflow – linux redirector to log filename with $date variable
We can find the memory usage on a Ubuntu server using the following command
free -m
To check your file encoding/charset. Use the following command.
file --mime-encoding <filename>
Possible output:
<filename>: utf-8
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
Haven’t worked with CentOS for a long time. Miss the time and the teammates in HKU CECID.
Here are the steps to install Alternative PHP Cache (APC) on CentOS.
1. Install the following packages.
yum install php-pear php-devel httpd-devel pcre-devel gcc make
Each Linux user may want to have timezone different from the server. In Ubuntu, you can set it using the tzselect command.
1. Run the tzselect command and select the continent or ocean.

Continue reading
A file system check in Linux is equivalent to chkdsk in Windows. It can only run on unmounted drive so if you want to run it on the next reboot, you can use the following command.
shutdown -rF now
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
The Ubuntu Tweak provides some desktop and systems configuration options which the default Ubuntu settings does not provide.

Continue reading
If you are a long time Windows user, the Ubuntu default graphical user interface which has the launcher on the left hand side may be a bit unfamiliar to you.

Continue reading