Thursday, October 24, 2013

To find a file in Linux by name

For example, to find a file "pg_hba.conf" in CentOS


Method 1
>  cd /
>  sudo find . -depth | grep -i pg_hba.conf


Method 2
> cd /
>  sudo updatedb
>  sudo locate pg_hba.conf



No comments: