Tuesday, December 15, 2009

How to change boot order in GRUB2?

With Ubuntu 9.10 (Karmic Koala), GRUB2 is the default boot loader.
How to change boot order in GRUB2?

$ cat /etc/grub/grub.cfg
see the order of the wanted kernel. Starts from 0.

$ vi /etc/default/grub
change GRUB_DEFAULT=0 value to wanted kernel

3. run
$ update-grub
to update

4. reboot and check with
$ uname -r
to see if correct kernel selected.

Monday, December 7, 2009

Find Biggest Files/Directories

Since ls does not give correct size on disk, better to
use du command.

$ du /path/to/dir | sort -nr

I hope above
command will give you the proper result you wanted.

Note: The above command may take large time, depending on

number of files in /path/to/dir . You can use depth(say 2) in
that dir.

$ du --max-depth=2 /path/to/dir | sort -nr