April 26, 2024, 02:25:37 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: How to search for a particular file using ls command  (Read 3368 times)

taraj

  • Guest
How to search for a particular file using ls command
« on: September 18, 2005, 03:40:03 AM »
I saw the man page for ls but got now idea that how I can search for a file in whole system using "ls" .

Say I want to find that where is the file name "xys" in my system then how can I find it .

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
How to search for a particular file using ls command
« Reply #1 on: September 19, 2005, 04:37:48 AM »
U can do this by find command

#find / -name  xys

where / is the dir name  where u want to search the file (here / symbol means u want to search it in root)

If u want to find the file only in /usr dir then command become:-
#find /usr -name xys


Cheers
Gaurav