LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dir /s (https://www.linuxquestions.org/questions/linux-newbie-8/dir-s-618570/)

cj4331 02-04-2008 08:10 AM

dir /s
 
How can I search the whole drive for a file? Like dir something.* /s did on DOS.

philwynk 02-04-2008 08:18 AM

It's a bit longer in Unix.
find / -name thefileImlookingfor.txt -print
The "/" after "find" indicates the starting point of the search. If you start at "/", you get the whole file system.

Since the display here doesn't seem to permit extra spaces to emphasize separation, note that there are spaces after "find", "/", "-name", and the name of the file.

onebuck 02-04-2008 08:28 AM

Hi,

You could use the 'man dir' to understand the command for UNIX/Linux.

You could do a 'dir -a -R / |grep -i thefileImlookingfor.txt'. When you issue the command then all the instances of 'thefileImlookingfor.txt' will be presented. Not the best way but you asked.

'man' is your friend!

cj4331 02-04-2008 09:10 AM

Thank you both!


All times are GMT -5. The time now is 12:41 PM.