Archive for the ‘Linux’ Category

File and disk space usage report on Linux

August 26, 2007

Linux has very useful commands but usually they need some extra parameters to read the output easily. du and df are among these. du reports the file and directory usage. It is the command to find about the size of a directory and its sub-folders. Here it is how I use it:

du --block-size=1M --exclude='./.*' --max-depth=1 |sort -n

and the output,

du

--block-size gives the file size in 1 megabyte blocks, --exclude='./.*' does not select the files&folders provided by the pattern which is hidden files&folders and --max-depth=1 shows only the directories. After these options I sort the output so that it lists by ascending according to directory size. The last number 7107 is the total size of my home directory in megabytes except the hidden folders&files. You can put this command as duu into alias list by typing

echo alias duu='du --block-size=1M --exclude='./.*' --max-depth=1 |sort -n' >> ~/.bashrc

df is similar but for file systems. You can check the home and root folder usage easily:

df -h

df

-h parameter is for human readable output. It provides the total usage in mega or gigabytes. Otherwise numbers are in bytes which is hard to read.

Easy Configuration for VMware Player

July 2, 2007

It is fun to try out multiple Linux distributions on a single OS without partitioning your hard drive. If you don’t want to install VMware server, player version is an excellent tool for either virtual LiveCD or installation purposes. You can see various distributions installers and improve your Linux installation skills.

First, you need VMware Player. You can download it from http://www.vmware.com/download/player. I have version 1.0.3 installed on my Windows XP box but you can try the newest one. You need to fill out couple of things to be able to download it. Other than that it is free. After you ran the VMware Player, it will ask you to select a vmx file. If you are clueless about how to make one, this post will show you how to get one.

http://www.easyvmx.com/ is your friend to get configuration files for VMware Player. Click on Super Simple Virtual Machine Creator. You can fill the tables as shown below with your information.

vmware1

Hit Create Virtual Machine button and save the zip file on to your computer. Extract the package. You will see couple of vmdk and one vmx file. vmdk is your virtual hard drive and vmx is your configuration file. When you double-click on vmx file it will open up the VMware Player and start loading whichever file you specified at LiveCD (ISO) section above picture. Below is showing Fedora 7 boot selection:

fedora_vm

You can start installing or playing your virtual Linux system. You will see your virtual hard disk during installation. After the installation we need to make a small change on the configuration file so that we can boot into newly installed virtual OS. Otherwise, VMware player will boot into .iso file. Open up your .vmz file with wordpad and scroll down:

# LiveCD
ide1:1.present = "TRUE"
ide1:1.fileName = "G:\Fedora7\F-7-i386-DVD.iso"
ide1:1.deviceType = "cdrom-image"
ide1:1.startConnected = "TRUE"
ide1:1.mode = "persistent"

Change the TRUE value of startConnected to FALSE. By doing this, we turned of booting into  the .iso file.  You  can  make different configuration files using EasyVMX  and try  different tastes of Linux without  partitioning your hard  drive.

KDE & Firefox Fonts

May 3, 2007

Original configuration of KDE and Firefox font settings in Gentoo and Slackware 11.0:
(more…)

Beryl Performance Improvement

April 28, 2007

I found a little but very effective trick at liquidweather.net. You need to simply uncheck Sync To VBlank, uncheck Detect Refresh Rate and change Refresh Rate to 200 under the beryl-settings-manager Main tab General Options.

Finding available RAM

April 28, 2007

If you don’t know the terminology, it is difficult to understand the output of free command. The following is an example output:
(more…)

Hover Tab Close Buttons in Konqueror

April 26, 2007

I was looking for a functionality in Konqueor similar to Firefox tab close buttons. I found the following from KDE wiki :
(more…)

Pardus on Compaq c508us Laptop

April 19, 2007

Vista Installation and Linux Preparation
This laptop has Intel Celeron M processor, 512MB RAM, CD/RW-DVD combo drive, Intel GMA 950 integrated video card. Before installing Pardus, I had to finish Vista installation and recovery CD burn. Vista gives one time chance to burn these 7 CDs. Installation took about half an hour and there was no problem. I searched on the web before I bought the laptop so that Vista-Linux dual boot installation would be error free. This link gave me the information that I needed to shrink volume C before starting linux installation. Right click My Computer –> Manage –> Storage –> Diskmanagement –> Click on C drive and shrink. I shrinked about 10.25 GB.
(more…)

Mpeg from pictures

March 16, 2007

I needed to generate animations from the pictures which were post processed after a computational fluid dynamics simulation. I didn’t want to use analysis software tools because it was generating the movie for just one variable at a time. I needed for more than four variables. So I decided to capture images from post processor and handle myself to save time. I had to use mpeg_encode for this. With the help of imagemagick and Perl it’s an easy job.
(more…)

Simple .bashrc and custom prompt

March 12, 2007

After I installed Slackware 11.0 on my desktop as a virtual OS, I saw that there wasn’t any default .bashrc file under my home directory. I just needed basic things like a custom prompt, colorful ls list and some aliases. Copy the following to your .bashrc under /home/yourusername:
(more…)

Firefox backspace action

March 12, 2007

If you use Firefox on windows, backspace takes you one page back in the session history. In Linux builds after 12/06/2006, Alt+left arrow does the same thing. If you want to change this behavior what you have used to, type about:config in the address bar. You will see a long list. Then find browser.backspace_action and change its value to 0 (zero) by right clicking and selecting modify. Detailed information can be found at mozillaZine.