Home News Contact us Blog   Get Listed

Search for C,C++,DAA Programs. Send video songs to your loved ones.

 
Custom Search
   

Shaadi.com Matrimonials

 

Knowledge Base
Question Bank Home
Gift your mate
Write Reviews

 

 

Unix: Operating System - Page 10

Page1 || Page2 || Page3 || Page4 || Page5 || Page6 || Page7 || Page8
Page9 || Page10 || Page11
 

 

Mesg : YOUR WILLINGNESS TO TALK
Online communication with talk can be disconcerting to a user who might be watching the output of an important program on her terminal at that instant. In that case, she can use the mesg command to prevent such intrusions.
Syntax : Mesg
Like, the command Mesg n prevents other people from writing to the terminal. Y enables receipt of such messages. If you want to know the status of your terminal is in, simply use mesg without arguments.

Mailx : THE UNIVERAL MAILER
One of the strengths of UNIX lies in the its command line tools. A
few character—based mail agents can do that, one of them is mailx. There are two ways of invoking mailx—in the sending and receiving modes. In the sending mode, mailx is used with the email address of the recipient as argument.
Syntax : $ mailx
Sending Mail :
In the sending mode, mailx turns interactive, prompting for the subject first. You have to key it in first and then enter the message body. The same convention apply : use the standard input to key in your input and then use [ctrl—d].
Example :
$ mailx Charlie
Subject : new system
The new system will start functioning from next month.
Convert your files by next week – henry
[ctrl—d]
sending a message is as simple as this. The sent message doesn’t directly appear on charlies terminal but lands in his mailbox, which is usually /var/mail/Charlie.
Receiving Mail :
All incoming mail is append to the mailbox. This is a text file
named after the user—id of the recipient. UNIX systems maintain the mailbox in a directory defined by the MAIL variable, which is usually /var/mail. By default, mailx reads this file for viewing received mail.
 

Wall and News :
These are two commands namely Wall (Write All) and News to inform common information or instructions to all users simultaneously. This is generally done by system administrator. News is used as a general information that may be displayed at login and Wall is something like write to force a message on all user’s terminals.
Syntax : $ news message
Syntax : $ wall message

I/O REDIRECTION & PIPING COMMANDS
Redirection means the input to a command can be taken from a file other than the user’s terminal keyboard. Similarly, output of command can be written onto a disk file or onto the printer instead of the screen(VDU). Three types of redirection in unix are :-
 > :- output to be stored in directed file not on the user’s terminal.
Syntax :- cat filename1 > filename2
Example:- cat test1 1 > test2 1 means output redirection.

 < :- input to be taken from the file .
syntax :- cat < filename
Example :- cat 0 < test 0 means input redirection.

 >> :- output to be appended to end of file content and not overwrite.
Syntax :- cat filename1 >> filename2
Example :- cat test1 >> test2

Piping:
A piping operation can be specified from command itself. To pipe the output of one command to another, insert the pipe symbol between two commands. The shell creates a pipe for this operation & first command writes into one end of it. Second program requires the output of first command and starts the processing it. Piping character appears as a broken vertical line. The programs do not have to be written to perform complex tasks. There is no limit to the number of filters or commands in a pipe.
Example :- ls | wc – l
                  ls | pg


EXTRA COMMANDS
Ln :
Files are linked with ln comand with two filenames as arguments.
Syntax:- ln file1 file2
Eg:- ln f1  f2

TOUCH:
To create an empty file on disk.
Syntax: $Touch filename
Touch command is use for following 3 purposes :
a. Creation time
b. Last access time
c. Last modification time
It is use to alter the access time, creation time and modification time.
Switches:
 –a : access time
 –c : creation time
 –m : modification time
If these switches are not there, it updates all the three.

Uname :
You know your machine name by this command.
Syntax:- uname
Switches:-
-n :- machine name in network.
-a :- processor on which version exists.
-v :- version of unix.

Du :
It displays the space used by files and directories whose names are specified. When used without any arguments du ascends the directory tree in current directory and reports number of blocks used by each directory.
Syntax :- du
Switch:-
-as :- to generate blocks used by individual files in any specified directory.

Df :
You can determine the amount of free disk space on the disk for each file system usin df command.
Syntax:- df

Dfspace :-
It is not valid command in unix. The file is present in /etc directory and owner in the root.
Syntax :- ls –l /etc/dfspace

Previous    :   Next

© copyright 2008 created by www.citysuvidha.com