ODOC: wall

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: linux
in ODOC | 70 Words

ODOC: who

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: linux
in ODOC | 138 Words


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 foo — Show information about foo (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: linux
in ODOC | 189 Words

ODOC: mount

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 /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

Tech Tags: linux
in ODOC | 336 Words

ODOC: sleep/usleep

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

Tech Tags: linux
in ODOC | 124 Words

ODOC: wc

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: linux
in ODOC | 149 Words

ODOC: tput

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: linux
in ODOC | 147 Words

ODOC: cal

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

Tech Tags: linux

Freenet – Uncensored file sharing

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.