BVS Blog [dot] BE

De technische blog van de persoon gekend als BVS

Zoeken in tekstbestanden op linux

Filed under: Linux — マシンの神 at 9:53 pm on Friday, February 10, 2012

Met dit commando kan je een bepaalde tekst zoeken in verschillende (tekst)bestanden op linux:

grep -Rs --include=*.php zoektekst /var/www/*

Dit voorbeeld zal zoeken naar de term ‘zoektekst’ in alle bestanden met de extensie .PHP onder de map /var/www

De optie -R zorgt ervoor dat ook gezocht wordt in alle submappen

de optie -s zorgt ervoor dat foutmeldingen over lege bestanden of mappen niet zullen weergegeven worden

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.


Categorie-Cloud

2000 Algemeen Besturingssystemen Databases Google Calendar Gratis Software GSM Hardware ICT Wetgeving Internet Legaal Linux Mac Microsoft Mozilla Firefox Mozilla Thunderbird mySQL Nokia Office OpenOffice.org Outlook Piraterij Security Software ontwikkeling Ubuntu Vista Windows XP