ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 


 

Company >> Deloitte >> Interview Questions >> Unix Commands Interview Questions
 
  Everything Else AllOther Interview Questions (1)   Call Centre AllOther Interview Questions (1)   Accounting AllOther Interview Questions (4)
  Audit Interview Questions (1)   Human Resources Interview Questions (5)   Finance Interview Questions (2)
  Oracle Apps Technical Interview Questions (2)   FI CO Interview Questions (2)   SD Interview Questions (16)
  ABAP Interview Questions (22)   Data Warehouse General Interview Questions (1)   Informatica Interview Questions (6)
  Business Objects Interview Questions (1)   Manual Testing Interview Questions (3)   QTP Interview Questions (1)
  Unix Commands Interview Questions (1)   Dot Net General Interview Questions (10)   ASP.NET Interview Questions (2)
 
Back to Questions Page
Question   What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands? Rank Answer Posted By  
 Interview Question Submitted By :: Sarun5
I also faced this Question!!   © ALL Interview .com
Answer
find: it searches a specified file or directory in file 
system 
grep: it search a specified string in a file or directory

sed: it replased a specified string.
 
0 Sureshreddy
 
 
Answer
find is finding a specific file & directory with perm... 
wise,hardlink...

grep : search a specified string on the line. it will take 
from output or file

sed: is a editor tool. using this u can do what u want....
 
0 Mohan
 
 
Answer
Find : This unix command is used to search for a particular
file in unix directory. Syntax for the same is 
find .* - <file name pattern>


Grep : This command will search for a string/text in
specified file. syntax for the saame is 

grep -<switches> <pattern> <FileName>

there are number of switches availbale for this command.

Sed : its an editor
 
0 Dj
 
 
 
Answer
FIND & GREP
Basically FIND & GREP are the UNIX commands shared through 
the FILTERS .Where is SED (STREAM) is one of the main 
editor.

FIND : Find is an exclusive command used to find   
files/folders are other information.and this is powerfull 
then windows.

ex : # find /raja -name shekar -print
output : raja/shekar


Grep : This is also one of the important command used to
globally searching the regular expression in the file .
GERP is grepping the information character by character.
(i.e) from file .

ex 1) : #GREP "cat" raja 
   2) : #GREP -i "cat" raja (for case sensitive)
   2) : #GREP -v "cat" raja (v represent negative )

OUTPUT :if we have an file raja with data regarding cat we 
can clearly explain.
 

Finally SED (STREAM)

SED : It is an editor but non interactive .
      
ex : # sed -e 'd/chain/dog/f' raja > shekar
 
0 Phani
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com