Find Total Size for All Files in a Directory in Linux

In Windows, if you right-click on a folder and select Properties, one of the useful things that you get is the sum of sizes of all files contained in the folder and its sub-folders. It may take a while if there are a lot of files and folders. This number can be very useful in certain situations. For example, when copying a large hierarchy of files from one place to another during backup or relocation, it helps to check that all files were copied successfully, and one of these checks is to compare the total size of data in source and destination.

When copying between Windows and Linux, the problem is that while Gnome does provide a similar feature,  the size reported is not precise and it includes sizes of folders as well. To get the same size as reported by Windows, go to command line, change to the root of the directory hierarchy you need the total file size for, and type

find -type f -printf "%s\n"|awk '{sum+=$0}END{print sum}'

Thanks goes to ghostdog74 and others at

Run As Root From File Browser

Ubuntu – suppose you need to make changes to a file which is not user-editable. Or you have an installation script that must be run as root. The most commonly offered solution is to fire up a terminal, change into the directory containing the file and type

sudo gedit filename



However, there is a solution that does not involve the terminal at all. Continue reading Run As Root From File Browser