Tuesday 19 March 2019

linux command to search or find a file or text

$ sudo grep -iRl 'host=localhost' htdocs/


example

grep -irl 'libconfig.h' /usr/
/usr/share/doc/python-gobject-base-3.22.0/NEWS
/usr/share/doc/glib2-2.56.1/NEWS
/usr/share/doc/libconfig-1.4.9/ChangeLog
[root@localhost include]# vi /usr/share/doc/libconfig-1.4.9/ChangeLog

No comments:

Post a Comment