Ubuntu 6.04 Alpha 4 – Dapper Flight 4 released

Ubuntu Linux 6.04 Alpha 4 has been released and it has got many improvements like

  • new graphical installer splash using gfxboot
  • a new kernel version with special builds for various types of servers
  • speed improvements all around
  • new versions of all sorts of software

Aside from GNOME 2.14 and Espresso, most of what is in Dapper now will be in the final release in April.

ubuntu, gnome, espresso, linux, kernel,gfxboot

ODOC: sar

sar — System Activity Report


The sar command writes to standard output the contents of selected cumulative activity counters in the operating system. The accounting system, based on the values in the count and interval parameters, writes information the specified number of times spaced at the specified intervals in seconds.


$ sar — Print the CPU Utilization report.

$ sar -A — Print all info in report format.

$ sar -b — Report I/O and transfer rate statistics.

$ sar -e 12:00:00 — Print report from 00Hr to 12Hr

$ sar -s 10:30:00 — Print report from 10:30AM to now.

$ sar -u 2 5 -o out.file — Report CPU utilization for each 2 seconds & write the 5 lines output to out.file.

$ sar -f out.file — Generate the report from the out.file.

$ sar -h -f out.file — Print file contents in a format that can easily be handled by pattern processing commands (ex: awk)

$ sar -r -n DEV -f /var/log/sa/sa01 — Display memory, swap & network statistics saved in daily log file ‘sa01’.

$ sar -R 2 5 — Report memory statistics for each 2Sec for 5times.

Read: man sar
sar, odoc, linux, gnu/linux

ODOC: hostid

hostid – Print the numeric id for the host.


It will print a 32-bit hexadecimal numerical identifier for the host machine. Certain product registration procedures use this number to brand a particular user license. The 32-bit quantity happens to be closely related to the system’s IP address, but that isn’t always the case.

If your IP address is then your hostid is A8C09B0E.

A8 — 168
C0 — 192
9B — 155
0E — 14


$ hostid — Print the hostid of the current host.

Read: man hostid
hostid, network, odoc, linux, gnu/linux

MySQL vs PostgreSQL

Found this nice site where there is a comparison about the two most popular database – MySQL and PostgreSQL. It compares MySQL 3.x, 4.0, 5.x and PostgreSQL 7.x. Though POstgreSQL has nicer features, most webhosting companies support only MySQL.
mysql, postgresql, postgres, database

ODOC: find

find — Search for files in a directory hierarchy


Find is useful to search in the deeply nested collection folder. It can execute some actions on the files, which are found by it and it provides lots of useful options for file searching.


$ find — List all files in current and its sub Dir.

$ find / -name resolv.conf — Find the resolv.conf

$ find /etc -name ‘*conf*’ — Find all conf file /etc Dir.

$ find ~/ -size 1000c — Find files that have a size equal to 1KB.

$ find ~/ -size +1500c — Find files that have a size > 1KB.

$ find ~/ -size -1500c — Find files that have a size < 1KB. $ find ~/ -empty -- Find empty files and directories. $ find ~/ -amin -5 -- Find files accessed in last 5 minutes. $ find ~/ -atime -1 -- Find files accessed in last 24 hours. $ find ~/ -mmin -5 -- Find files modified in last 5 minutes. $ find ~/ -mtime -2 -- Find files modified in last 48 hours. $ find ~/ -size +1kc -and -mtime 2 -- Find files (Size >1K & modified time is 2 Days)

$ find ~/ -nouser — Find files owned by an invalid user.

$ find ~/ -user user1 — Find files owned by user1.

$ find ~/ -maxdepth 2 -name ‘fi*’ — Search for files starting with ‘fi’ and don’t go more 2 level down in the Dir structure.

$ find ~/ -name ‘*.conf’ -ls — Find the all .conf files and print the output in ls -l format.

$ find ~/ -name ‘*.txt’ -exec cat {} ; — Find all text files and cat the files.

$ find ~/ -name ‘*.txt’ -printf %hn — Find all text file and print the path of the each file.


  • In the examples, I used Home path for searching the file. You can change it to any other path.
  • Read the man page, to know about other useful and advance options.

Read: man find
find, odoc, linux, gnu/linux

ODOC: dmesg

dmesg – Print or Control the kernel ring buffer

Summary :

dmesg is used to examine or control the kernel ring buffer. The program helps users to print out their boot-up messages.


$ dmesg — Print the kernel boot-up messages.

$ dmesg > boot.mesg — Redirect the out to file.

# dmesg -c — Clear the ring buffer after printing.

# dmesg -s4096 — Set the kernel ring buffer size.

# dmesg -n1 — Set the level at which logging of messages is done to the console.

1 — Action must be taken immediately
2 — Critical conditions
3 — Error conditions
4 — Warning conditions
5 — Normal but significant condition
6 — Informational
7 — Debug-level messages
8 — All

Read: man dmesg
odoc, dmesg,linux, gnu/linux, kernel

ODOC: ln

ln — Make LiNks between files.

Summary :

Create a link to the specified TARGET with optional LINK_NAME. If LINK_NAME is omitted, a link with the same basename as the TARGET is created in the current directory. By default, it makes HardLinks.

A “hard link” is another name for an existing file. The link and the original are indistinguishable. They share the same inode.

A Soft links/Symbolic links/symlinks are a special file type. The link file actually refers to a different file, by name. At runtime kernel automatically “dereferences” the link and operates on the target of
the link.


$ ln –help — Show help info.

$ ln A B — Creates hard link B for file A.

$ ln -b A B — Same as above. If B is already exist then Take a backup (B~) and creates new B.

$ ln -b -S .bak A B — Same as above. If B is already exist then Take a backup with specified extension name(B.bak) & creates new B.

$ ln -f A B — Force. If B is exist then overwrite it.

$ ln -i A B — Interactive. Prompt the user for removing the already existing file B.

$ ln -s A B — Creates soft link B for file A.

$ ln -s dir1/myfile — Creates link ./myfile pointing to dir1/myfile.

$ ln -s dir1/myfile myfile — Creates link ./myfile pointing to dir1/myfile.

$ ln -s a b .. — Creates links ../a and ../b pointing to ./a & ./b

Read: man ln
odoc, ln, linux, gnu/linux, links

ODOC: file

file — Try to determine the FILE type.

Summary :

File tests each argument in an attempt to classify it. There are 3 sets of tests, performed in this order:

  1. File System Test
  2. Magic Number Test
  3. Language Test

The File System test is based on examining the return from a stat(2) system call. The program checks to see if the file is empty, or if it’s some sort of special file (block, char, pipe, …).

The Magic Number test is used to check for files with data in particular fixed formats. For example, a binary executable files will have magic number in some fixed position to indicate the OS, that file is executable. Few standard data files also following the magic number concept.

The Language Test will happen, if a file does not match any of the entries in the magic file. File will be checked for the ASCII, UTF8, ISO-8859-x, … Char set. Once file has determined the character set
used in a text-type file, it will attempt to determine in what (programming) language the file is written.

Unidentified file will classified as “data”.


$ file myfile — Print the file type.

$ file -b myfile — Don’t the filename in the output.

$ file -f list — Take the input filenames (one per line) from the file ‘list’.

$ file -k myfile — Print all matches.

$ file -z myfile.tgz — Try to look into compressed file.

$ file -i myfile — Print the output in MIME format.

$ file -m mymagic myfile — Use custom magic file.

# file -s /dev/hda? — Take blk/char special files as an argument.

Read: man file
odoc, file, linux, gnu/linux, file+system

Novell’s Masters Degree in Linux

Novell has teamed up with Charles Sturt University in Australia to offer what we believe is the first Masters Degree focused on Linux. The university decided to debut the degree because of rapid growth in demand for Linux training and expertise. The degree program includes obtaining Novell’s Certified Linux Engineer certification, including passing of the Novell Practicum exam. This is good evidence of growing interest in Linux by new entrants into the IT workforce, and the University’s choice to go with Novell in the curriculum is a nice vote of confidence.
linux, novell, linux+certification

ODOC: groupdel

groupdel — Delete a group

Summary :

The groupdel command modifies the system account files, deleting all entries that refer to group.


# groupdel mygrp — Remove all entries about the mygrp.


  • The named group must exist.
  • You may not remove the primary group of any existing user. You must remove the user before you remove the group.

Read: man groupdel
odoc, groupdel, linux, gnu/linux