Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Don't know where a file is and need to find it?

Reply  
Thread Tools
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
23-Jan-2008, 12:08 PM #1
Don't know where a file is and need to find it?
Misplace a file? Find it quick!.

Discusses: whereis, locate and find commands.

There is also the which command to find executables that is not discussed. I must admit, I have never used the (s)locate command, as I am an old hand at using the find command.

My favorite way to use the find command is to use the -exec feature to scan for strings in files that match the scan criteria, for example:

$ find . -name "*.txt" -exec grep -i foo {} \; -print

The above find command starts in the current directory '.', matches on any file named with the .txt suffix, and then executes the grep command, case insensitive (-i) to look for the character string "foo" in each located .txt file, and lastly prints the results of the grep on the located files only.

Don't know what grep does? Issue the command: man grep

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
TRS-80 vet's Avatar
Account Closed with 3,152 posts.
 
Join Date: Jun 2005
Experience: Beginnerd/Mensan -
23-Jan-2008, 03:38 PM #2
Mods; make a sticky
bearone2's Avatar
Account Disabled with 5,855 posts.
 
Join Date: Jun 2004
Location: hawaii
Experience: Advanced
23-Jan-2008, 03:41 PM #3
gees, i just use "search".

i don't find it necessary to reinvent the wheel.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
23-Jan-2008, 07:00 PM #4
Quote:
Originally Posted by bearone2 View Post
gees, i just use "search".

i don't find it necessary to reinvent the wheel.
Hi bearone2,

Looks like you are using the reinvented wheel as find was there first!

I use Ubuntu 7.10, Gutsy Gibbon's Live CD, and search is not a normally installed command as far as I know in Linux.

What release of Linux are you using that has a search command installed?

"search" is not a standard command in either Unix or Linux - are you talking about searchmonkey that is aimed at replacing find/grep tools?

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
bearone2's Avatar
Account Disabled with 5,855 posts.
 
Join Date: Jun 2004
Location: hawaii
Experience: Advanced
23-Jan-2008, 07:55 PM #5
check my sig
prunejuice's Avatar
Senior Member with 2,568 posts.
 
Join Date: Apr 2002
23-Jan-2008, 09:39 PM #6
Quote:
Originally Posted by bearone2 View Post
check my sig
What should we be looking for? I don't get it...
bearone2's Avatar
Account Disabled with 5,855 posts.
 
Join Date: Jun 2004
Location: hawaii
Experience: Advanced
24-Jan-2008, 12:51 PM #7
do you see linux on any of the machnes in my sig/list of equipment? i didn't see "linux" in the header when i initially replied.
RootbeaR's Avatar
Computer Specs
Distinguished Member with 4,606 posts.
 
Join Date: Dec 2006
Location: Ontario, Canada
Experience: Getting it
24-Jan-2008, 07:07 PM #8
Quote:
Originally Posted by lotuseclat79 View Post
What release of Linux are you using that has a search command installed?

"search" is not a standard command in either Unix or Linux - are you talking about searchmonkey that is aimed at replacing find/grep tools?

-- Tom
PCLOS has a Find feature under its main menu listed under actions. Breaks it down from there to Find Files or Web Search.
RootbeaR's Avatar
Computer Specs
Distinguished Member with 4,606 posts.
 
Join Date: Dec 2006
Location: Ontario, Canada
Experience: Getting it
24-Jan-2008, 07:09 PM #9
Meant to attach these.
Attached Thumbnails
Don't know where a file is and need to find it?-snapshot5.jpg   Don't know where a file is and need to find it?-snapshot6.jpg  
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
25-Jan-2008, 11:58 AM #10
bearone2,

This is a Linux forum. You can get more traction by posting your non-sequiturs in the Windows forums - duh!

-- Tom
bearone2's Avatar
Account Disabled with 5,855 posts.
 
Join Date: Jun 2004
Location: hawaii
Experience: Advanced
25-Jan-2008, 12:51 PM #11
Quote:
Originally Posted by lotuseclat79 View Post
bearone2,

This is a Linux forum. You can get more traction by posting your non-sequiturs in the Windows forums - duh!

-- Tom
yo buckwheat.

did you happen to read my statement in post #7? probably not huh? non-sequiturs...a parable, what are you trying to say?
veribaka's Avatar
Member with 79 posts.
 
Join Date: Jul 2006
25-Jan-2008, 01:49 PM #12
Flame fest starting? Didn't see that one coming around here! However I have to agree with lotuseclat79, we're talking about a linux tool, why would that be reinventing a windows tool?

Settle down before it gets out of hand.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
25-Jan-2008, 02:31 PM #13
Cool yer jets verbaka, nothing is getting out of hand - just sit back and relax.

bearone2 uses a Google toolbar to index his files in order to search for his lost Windows files, and thus opens up his computer (once it gets compromised) to the bad guys finding what they want real easy like. In that case, the last laugh will be not be bearone2's.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
bearone2's Avatar
Account Disabled with 5,855 posts.
 
Join Date: Jun 2004
Location: hawaii
Experience: Advanced
25-Jan-2008, 04:01 PM #14
Quote:
Originally Posted by lotuseclat79 View Post
Cool yer jets verbaka, nothing is getting out of hand - just sit back and relax.

bearone2 uses a Google toolbar to index his files in order to search for his lost Windows files, and thus opens up his computer (once it gets compromised) to the bad guys finding what they want real easy like. In that case, the last laugh will be not be bearone2's.

-- Tom
what drug's are you using?

google toolbar?????where did you come up with that assumption??? to "find".....

who are these bad guys who will gain access....the tooth fairy and co or something more obscure.

please enlighten me.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
25-Jan-2008, 08:20 PM #15
Check out your signature bearone2 or should I say 'google tool bar boy'!

-- Tom
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:16 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.