Happy New Year

Saturday, December 31, 2005

First a very Happy New Year to all. I must first apologize for not posting regularly. But yesterday I went for a reunion among my old school friends and we had a great party. I think this year onwards I must try to post regularly and also try to write nice articles. I am planning to shift my blog from Blogger to a Wordpress one. I must get some money first and try to get some space. If you feel like donating to it, please mail me at srinivasanr@gmail.com.
And Happy New Year again.

comments links to this post Listen to this article Listen to this article

ODOC: wall

Thursday, December 29, 2005

wall -- Send a message to everybody's terminal.

Summary :

Wall sends a message to everybody logged. The length of the message is limited to 20 lines. You MAY need root permission, on some system, to run this command. This command is used to pass the some critical information to all.

Examples :
# wall "Welcome" -- Send the string "Welcome" to all.

# wall
Read : man wall
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: who

Wednesday, December 28, 2005

who -- show WHO is logged on

Summary :

who prints the info (login name, terminal line, login time, and remote hostname or X display) abt abt each user currently logged on.
who uses /var/run/utmp file to know abt the current users.

Examples :
$ who -- Show who are all logged on.

$ who -H -- Show info with header.

$ who -m -- only hostname and user associated with stdin.

$ who -q -- Show currently logged username and count.

$ who -r -- Show the current run level.

$ who -s -- Short form.

$ who -T -- Add user's message status as +, - or ?

$ who -a -- Show all info.

$ who am i -- Your detail.

$ who mom likes -- !!?? :-)

$ who /var/log/wtmp -- Who has previously logged on.
Read : man who
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: w

Tuesday, December 27, 2005

w -- show Who is doing What

Summary :

w is part of the procps package. w shows information about the users currently on the machine, and their processes. The header shows, in this order, the current time, Uptime, no. of current users, & load averages for the past 1, 5, and 15 minutes.

JCPU -- The time used by all processes attached to the tty. It does not include past background jobs, but does include currently running background jobs.

PCPU -- The time used by the current process, named in the "WHAT".

Examples :
$ w -- Show header, users and processes Information.

$ w bharathi -- Show information about bharathi (user) only.

$ w -h -- Don't show header info.

$ w -f -- Don't show FROM (remote hostname) field.

$ w -s -- Short format. Don't show login, JCPU and PCPU times.

$ w -u -- Ignores the username while figuring out the current process and CPU times of the current tty.
Read : man w

Atlast my exams were over and I am now free for a week. I think I will resume my blogging and try to write new articles.
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: mount

Friday, December 23, 2005

mount -- Mount/Attach a File System to a File Tree.

Summary :

All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.

Examples :
$ mount -- List all mounted FSs (FileSystem).

$ mount -l -- List all mounted FSs with Labels.
# mount -a -- Mount all entries in the /etc/fstab.

# mount /mnt/cdrom -- Mount known device to cdrom dir. Mount will find the cdrom device (/dev/hdX) from /etc/fstab.

# mount /dev/hdd -- Mount device at the known place. Mount will find the mount point (Ex. /mnt/cdrom) from /etc/fstab.

# mount -t ext2 /dev/hda2 /tmp/dir1 -- Mount a Linux partition at /tmp/dir1.

# mount -t vfat -o rw,umask=0007 /dev/hda1 /mnt/C -- Mount Windows FAT partition

# mount -o rw /dev/fd0 /mnt/floppy/ -t vfat -- Mount FAT format floppy in Read and write mode.

# mount -t nfs 192.168.14.155:/home/one /home/one -- Mount NFS partition, from a machine with particular IP, to /home/one dir.

# mount /tmp/fdimage /mnt/test1 -t msdos -o loop=/dev/loop3,blocksize=1024 -- Mount msdos Floppy disk image via loopback device.

# mount /tmp/cdimg.iso /mnt/test1 -t iso9660 -o loop=/dev/loop3,blocksize=1024 -- Mount a CD iso image via loopback device.

# mount --bind /mnt/cdrom /mnt/test1 -- Mount the /mnt/cdrom in another location. So you can access in the FS in two places.

# mount -t tmpfs none /mnt/test1 -o rw,size=1m -- Mount a tmpFS

# mount -t tmpfs none /mnt/test1 -o remount,ro,size=1m -- Remount the same partition with different permission.

# mount -t ntfs /dev/sda1 /mnt -- Mount a NTFS (Default - Read Only)

# umount /mnt/test1 -- Unmount the file system from /mnt/test1.
Read : man mount, fstab

comments links to this post Listen to this article Listen to this article

ODOC: sleep/usleep

Tuesday, December 13, 2005

Sorry I was busy for the two days and couldn't post here. And my rescheduled exams start from 16th Dec till 27th Dec.

sleep/usleep -- Sleep for a specified amount of time

Summary :

Sleep will introduce a delay for a specified seconds (Seconds may be an arbitrary floating point number). usleep sleeps some no of micro-seconds (default is 1).

Examples :
$ sleep 6 -- Sleep for 6 Seconds.

$ sleep 6s -- Sleep for 6 Seconds (Default).

$ sleep 6m -- Sleep for 6 Minutes.

$ sleep 6h -- Sleep for 6 Hours.

$ sleep 6d -- Sleep for 6 Days.

$ sleep 10.5 -- sleep for 10.5 Seconds.

$ usleep 200 -- Sleep for 200 micro Seconds.
Sleep may NOT give a very accurate result on many machines.
Read : man sleep, usleep

comments links to this post Listen to this article Listen to this article

Open Office.org Easter Egg

Sunday, December 11, 2005

I found this easter egg for Open Office.org 2.0 and found it amusing.
In any cell type in =Game("StarWars"). A small, space invaders style game will appear.

comments links to this post Listen to this article Listen to this article

ODOC: wc

Sunday, December 11, 2005

wc - Count & Print the No. of Bytes,Words & Lines in files.

Summary :

Print byte, word, and newline counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read stdin.

Examples :
$ wc -- Accept the input from stdio and count

$ wc myfile -- Print the no .of bytes, words, lines in the file.

$ wc -l myfile -- Print the newline counts only

$ wc -w myfile -- Print the words count only

$ wc -c myfile -- Print the bytes count only

$ wc -L myfile -- Print the length of the longest line

$ wc f1 f2 f3 -- Print the no .of bytes, words, lines in each file and also print the total.

$ ls -1 | wc -l -- Print the total no .of files present in the dir
Read : man wc

Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: tput

Friday, December 09, 2005

tput -- Initialize a terminal or query terminfo database

Summary :

The tput utility uses the terminfo database to make the values of terminal dependent capabilities and information available to the shell to initialize/reset/query the terminal.

Examples :
$ tput cols -- Print the no of cols for the current terminal.

$ tput cup 10 5 -- Move the CUrsor Position to Row 20 & Col 5.

$ tput smso -- Starts highlighting

$ tput civis -- Make the Cursor invisible

$ tput cnorm -- Show Cursor

$ tput blink -- Starts blinking the chars

$ tput bold -- show chars in Light Bold

$ tput rev -- Show chars in Reverse Video

$ tput rmso -- Normal mode (No highlight/bold/blink)

$ tput longname -- Show the long name of the current term.

$ tput reset -- reinitialization of term with reset/init strings.

$ tput bold; echo -- Just to test.
Read : man tput

Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: cal

Thursday, December 08, 2005

cal - Displays a calendar

Summary :
Cal displays a simple calendar. If arguments are not specified, the current month is displayed.

Examples :

$ cal -- Displays current month

$ cal -3 -- Display prev & current & next month output.

$ cal -y -- Display a calendar for the current year

$ cal -m -- Display Monday as the first day of the week. Sunday is default.

$ cal 2005 -- Display a calendar for the year 2005.

$ cal 2 2005 -- Display a calendar for the month of Feb 2005.

$ cal 9 1752 -- Interesting. http://www.crowl.org/Lawrence/time/britgreg.html
Read : man cal , gcal

comments links to this post Listen to this article Listen to this article

Freenet - Uncensored file sharing

Thursday, December 08, 2005

Freenet is free software which lets you publish and obtain information on the Internet without fear of censorship. To achieve this freedom, the network is entirely decentralized and publishers and consumers of information are anonymous. Without anonymity there can never be true freedom of speech, and without decentralization the network will be vulnerable to attack. All communications by Freenet nodes are encrypted and routed through other nodes that make it difficult to see who is requesting for what content.
Users of Freenet contribute by giving their bandwidth and a part of their hard disk space(data store). Freenet doesn't allow the user to control what data to be stored. Instead, it automatically deletes the files which are not popular. And as they are encryted and stored, it reduces the likelihood of prosecution by persons wishing to censor Freenet content.
Many uses have been found for Freenet other than file sharing - like publishing websites(freesites), communication via message boards, content distribution, etc.
Over 2 million users have downloaded Freenet and it has provided censored content to China and Middle East.

comments links to this post Listen to this article Listen to this article

ODOC: tr

Thursday, December 08, 2005

tr - Translate or Delete characters

Summary :

tr will Translate, squeeze, and/or delete characters from stdin, writing to stdout.

Examples :
$ echo "fslog" | tr "fs" "FS" -- Translate f to F & s to S.

$ echo "fslog" | tr "[a-z]" "[A-Z]" -- Change case (lower to upper)

$ echo "HelloooOOOoooo" | tr -s '[:lower:]' -- Squeez the "lower" case letters.

$ echo "FxSyLzoyg" | tr -d xyz -- Remove xyz

$ cat myfile | tr -s '\n' -- Remove repeated new lines.

$ echo "ABCDEFG" | tr -c "ACEG" "\n" -- Expect "ACEG" translate others to newline char.
'tr' supports few std esc sequences, regular expressions, char classes
(lower, upper, space, blank, alpha,...), etc.

Read : man tr
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: more

Wednesday, December 07, 2005

more -- File perusal filter for crt viewing

Summary :

Perusal means the act of reading, especially of reading through or with care. More is a filter for paging through text one screenful at a time.

Examples :
$ more myfile1 myfile2 -- Show myfile 1 & 2 page by page.

$ more -10 myfile -- Show 10lines/page.

$ more -d myfile -- Usually more show % of viewed content only at the bottom. With -d it shows more verbose prompt.

$ more -p -10 myfile -- Don't scroll the output. Just the screen and display the text.

$ more -c -10 myfile -- Don't scroll. Instead, paint each screen from the top, clearing the remainder of each line as it is displayed.

$ more -s myfile -- Squeeze multiple blank lines into one.

$ more +/foo myfile -- The +/ option specifies a string that will be searched for before each file is displayed.

$ more +10 myfile -- Start at line number 10.
Apart from this option, more will support few interactive commands also. For example
:f -- Show current filename

:n -- Next file

:p -- Previous file

b -- Move backward

f -- Move forward

Space -- Next page

ENTER -- Next Line
Read : man more
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: cplit

Tuesday, December 06, 2005

csplit - Split a file into sections determined by Context

Summary :

Output pieces of FILE separated by PATTERN(s) to files `xx01', `xx02',..., & output byte counts of each piece to standard output. PATTERN(s) are Line Numbers or a Regexp.

Examples :
$ csplit myfile 10 40 80 -- 1st file contains 1-9 lines, 2nd 10-39 , 3rd 40-79 and 4th 80-EOF.

$ csplit myfile 10 10 80 -- Zero length file will be create for the 2nd parameter..

$ csplit -z myfile 10 10 60 -- Same as above. But Zero length file will NOT created

$ csplit myfile /foo/ -- Copy upto, but not the matching line and remaining in 2nd file.

$ csplit myfile %foobar% -- skip upto, but not the matching line
Read : man csplit

comments links to this post Listen to this article Listen to this article

ODOC: split

Monday, December 05, 2005

split - Split a file into pieces.

Summary :

Split is used to split a file into equal no .of lines. The output files are created with the default Prefix as 'x' and suffix as 2 digit number.

Examples :
$ split -l 10 myfile -- Split myfile into files of 10 lines.

$ split -b 100 myfile -- Split myfile into files of 100bytes.

$ split -C 25 myfile -- Put at most 25bytes of lines per file.

$ split -a 4 myfile -- Use suffixe of length 4 chars.

$ split -l 10 myfile myfile -- Use myfile as the prefix text.
Read : man split

comments links to this post Listen to this article Listen to this article

ODOC: head

Saturday, December 03, 2005

head - Output the 1st part of files.

Summary :

I should have posted this after the tail command, but forgot to do so. It does exactly the opposite by printing the first 10 lines of each FILE to stdout. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read stdin.

Examples :
$ head -- Read 10 lines from stdin & dump to stdout

$ head foo -- Show 1st 10 lines of the file.

$ head f1 f2 -- Show 1st 10 lines of file f1 & f2 with header.

$ head -q f1 f2 -- same as above But with-out header.

$ head -n 5 myfile -- Show 1st 5 lines only.

$ head -c 15 myfile -- Show 1st 15Bytes only.

$ head -c 15k myfile -- Show 1st 15KB only.
Read : man head
Tech Tags:

comments links to this post Listen to this article Listen to this article

ODOC: shutdown

Saturday, December 03, 2005

shutdown -- Bring the system down (Needs Root privilege)

Summary :

shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login is blocked. All processes are first notified that the system is going down by the signal SIGTERM. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system. However please take care not to use this command on production systems.

Examples :
# shutdown 12:00 -- Shutdown at 12:00

# shutdown +10 -- Shutdown after 10min

# shutdown now -- Immediate shutdown (now == +0)

# shutdown -t 10 -- Wait 10 Sec after warn the user

# shutdown -k -- Don't really shutdown; only warn

# shutdown -r -t 5 -- Reboot after shutdown

# shutdown -h -t 5 -- Halt after shutdown

# shutdown -f now -- Skip fsck (File System Check) on reboot

# shutdown -F now -- Force fsck on reboot

# shutdown -c -- Cancel the already waiting shutdown process.
Read : man shutdown

There has been a great deal of flooding in Chennai, India due to the heavy rain yesterday and there was no power in the morning. I have written about the plight of people due to the floods in my personal blog.

comments links to this post Listen to this article Listen to this article

ODOC: tail

Friday, December 02, 2005

tail - Output the last part of files.

Summary :

Print the last 10 lines of each FILE to stdout. With more than one FILE, precede each with a header giving the file name.

Examples :
$ tail foo.txt -- Show only the last 10 Lines.

$ tail f1 f2 -- Show the last 10 lines of 2 files with small header.

$ tail -vn 5 myfile -- Show only last 5 Lines with header.

$ tail -c 12 myfile -- Show only last 12 Bytes.

$ tail -q myfile -- Don't show headers.

$ tail --retry myfile -- Keep retrying to open myfile.

$ tail -f maillog -- Output appended data as the file grows. Useful to monitor logs.

$ tail -f -s 10 maillog -- Once in every 10s update the output.

$ tail -f --pid=200 myfile -- Terminate tail after PID (200) dies.
Read : man tail

comments links to this post Listen to this article Listen to this article

Make Firefox 1.5 work with all extensions

Thursday, December 01, 2005

The most common problem with Firefox1.5 is that most old extensions don't work. There is a workaround for this though. A simple modification to the Firefox Configuration will do the trick.
  1. At the location bar type about:config. This will show a list of firefox preferences.
  2. Right click on the list and select New > String. Enter “app.extensions.version” (without quotes) for the preference name.
  3. Then, enter 1.0 as the calue for the app.extension.version
  4. Then restart Firefox 1.5 and enable all the previously disabled extensions
  5. Restart Firefox 1.5 again to activate the extensions.
Here is the original post from where I found this.

comments links to this post Listen to this article Listen to this article

Firefox 1.5 released

Thursday, December 01, 2005

Firefox 1.5 has been finally released to public and claims to be faster and provides better web experience.
Here is a nice review of Firefox 1.5 at 1337tech.

comments links to this post Listen to this article Listen to this article

Previous Posts

Archives

Top Stories Today


referer referrer referers referrers http_referer

  • Subscribe to Free Software Blog
  • Google
Reader
  • Subscribe in Yahoo
  • Subscribe
in Bloglines
  • Link to Podcast

(RSS feed) for this blog
    Computers Blog Top Sites
  • Computers Blogs by Indian Bloggers
  • BLogstreet Profile

Sponsors