LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2008, 09:10 AM   #1
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Rep: Reputation: 15
dir /s


How can I search the whole drive for a file? Like dir something.* /s did on DOS.
 
Old 02-04-2008, 09:18 AM   #2
philwynk
Member
 
Registered: Sep 2007
Posts: 84

Rep: Reputation: 15
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.
 
Old 02-04-2008, 09:28 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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!
 
Old 02-04-2008, 10:10 AM   #4
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Thank you both!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to display /dir, /dir/sub, /dir/sub/files knockout_artist Linux - Newbie 9 10-25-2007 03:57 PM
Recursive Delete DIR and Sub Dir with CONTENTS jCash Linux - Newbie 1 05-14-2007 06:54 PM
Q. moving /bin dir files to /dev dir?? Texas_student Linux - Software 2 03-27-2006 12:42 AM
Share configuratin dir (.dir) for 3 accounts on local computer LiNuXkOlOnIe Linux - Software 5 01-08-2006 04:36 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 08:54 PM


All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration