Explain how you would find a specific string in a file.

Answer Posted / hr@tgksolutions.com

You can use the 'grep' program to locate a certain string in a file. 'grep "search_string" filename', for instance, will look for'search_string' inside 'filename' and show the lines that match.

An ideal applicant will be aware of extra options like 'grep -i' for case-insensitive searches and 'grep -r' for recursive directory searches. This indicates a deeper comprehension of the proper use of 'grep'.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does uname command do?

793


why is the tar command used?

740


What command used for showing user info like Login Name, Canonical Name, Home Directory,Shell etc in Linux?

790


Who command in linux?

693


What is nslookup command?

731


Which command is used to see the online manual?

784


What does history command do in linux?

717


What is make command in linux?

732


What are the linux commands used in devops?

735


How do I use nslookup in linux?

716


What is $@ in makefile?

742


How do I check cpu usage?

754


Explain grep command.

768


Main configuration file and command used for NFS enabling exported directories and deamons?

707


What command do you type to find help about the command who?

733