LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 08: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, 08: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, 08:28 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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, 09:10 AM   #4
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Thank you both!
 
  


Reply



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 02:57 PM
Recursive Delete DIR and Sub Dir with CONTENTS jCash Linux - Newbie 1 05-14-2007 05:54 PM
Q. moving /bin dir files to /dev dir?? Texas_student Linux - Software 2 03-26-2006 11:42 PM
Share configuratin dir (.dir) for 3 accounts on local computer LiNuXkOlOnIe Linux - Software 5 01-08-2006 03:36 AM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration