Linux: disk usage command – du

du is a standard unix command to calculate disk space from Unix/Linux system.

To get the sum space of the directory,

du

To get sum space with human-readable,

du -sh

To get sub directories space

du -sh *

To get sub directories space with all hidden folder,

du -sk .[!.]* * | sort -n

How to Prevent A directory scan by Android Gallery

For some purpose, you might want to hide certain folder to be scanned and display from your Gallery Apps as the number of pictures might slow down your images to be displayed or you do not want to display those icon from your Gallery Apps.

To done this, you may easily hide them by the step as below.
1. Use any file manager apps such as Astro file viewer.

2. Rename your folder with a dot in front of the folder such as image as above.
3. Now, open back your Gallery Apps and you will found out all the unwanted image is disabled.

How to Disable Windows 7 Preview from Internet Browsers

Whoever used Windows 7, you should know the most excited feature from Windows 7 is it’s preview mode from the task bar.

However, not everyone enjoy the feature due to hardware restriction. Hence you might want to disable the preview mode from the task bar for several Internet Browsers such as Mozilla Firefox, Google Chrome, Internet Explorer, etc.

Mozilla Firefox


To disable Preview from Mozilla Firefox, you may open the firefox and enter “about:config” from the address bar. Then just proceed with the button of “I’ll be becareful, I promise!”. In the filter bar, enter browser.taskbar.previews, and set the value to false for browser.taskbar.previews.enable.

Google Chrome

To disable the preview mode from Google Chrome, you may refer to the step as below.

From your Windows, go to the directory of “C:\Users\username\AppData\Local\Google\Chrome\Application\“, go to the properties of chrome.exe, move to Compatible tab and set the compatibility mode. You may choose to have Windows Vista mode(any mode from Windows Vista will do).

Internet Explorer 8

With Internet Explorer 8, you may go to the tools and change the setting from Internet Options.

From the tabs Setting there, click on the Settings button and you are able to see the image as beside.

Just checked the button named “Show previews for individual tabs in the taskbar” and the previews should be removed.

Schedule backup for MSSQL to remote computer

If you familiar with MSSQL maintenance plan and ever configured backup through this tool and you should know that to backup the MSSQL database to remote computer, you have to configure Log On setting from services.

Okay, today we assume that we couldn’t allow to change the setting from Log On setting and wish to set the schedule backup, we could use maintenance tool and batch command to schedule it.

Firstly, create a maintenance plan from MSSQL, then select “Back Up Database Task”. From Database(s) option, select your database name, you may specify the directory that wish to backup. From this article we make it to C:\mssql\backup\.

Next, create a batch file named mssql_backup.bat and insert command as below.

xcopy C:\mssql\backup "\\remote_server\c$\backup" /e /i /h /y

Where remote_server is your remote server name and you would like to place it to C:\backup.

Lastly, create Windows Task Scheduler and configure the mssql_backup.bat to run daily or weekly as your wish.