UNIX find, grep, sed

What is FIND, GREP and SED? Could you please give me the difference between all the three? Where we use this commnands?

Questions by sarun5   answers by sarun5

Showing Answers 1 - 3 of 3 Answers

cdubet

  • Mar 14th, 2008
 

find : locate a file matching conditionsexfind /src -name "*.c" : list all files contains in /src matching *.cgrep : search a text pattern in (a) file(s)ex grep abcd toto.csed : substitute/replace strings. usually used in script. use the unix regular expressions (ex [0-9] = all digits)as usually in unix, you can mix commands ex find / -exec grep txt {} ; list all files containing txt

Mustafa

  • Jun 14th, 2014
 

Find command is used to find a file.
grep command is used to find a contain or string in a file
sed command is used for filter purpose, if want to replace a word, want to print particular line of the file etc

  Was this answer useful?  Yes

find Command is used to find the file.

grep Command is used to search the content in the file.

sed command is used to search, as well as modify the content in the file.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions