LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 08-11-2005, 07:05 PM   #1
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Rep: Reputation: 30
Searching a specific directory for a specific extension?


If I were to want to search a directory (and its sub-directories) for files with a certain extension only..how would I do that?

For example..if I wanted to search my /home/ravencrow folder for files with the extension of jpg.
 
Old 08-11-2005, 07:28 PM   #2
shotwellj
Member
 
Registered: Jul 2005
Location: Tempe, AZ
Distribution: Slackware
Posts: 66

Rep: Reputation: 15
There are two good ways to search for things on your computer. The first is slocate and the second is find. Read 'man slocate' and 'man find' for more information.

You could try something like: find /home/ravencrow -iname "*.jpg" -print

Cheers,
Jacob
 
Old 08-11-2005, 07:29 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
find /home/ravencrow -iname "*.jpg"
 
Old 08-13-2005, 04:28 PM   #4
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Thanks
 
  


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
Remove ALL files from specific Directory bianchi Programming 9 11-24-2005 12:27 AM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 06:22 PM
How to make a specific command(s) work in a specific shell only naren_0101bits Linux - Newbie 3 08-28-2005 02:24 PM
'ls' failing in specific directory realjustin Linux - General 1 09-20-2004 02:55 PM
Access directory from specific IP mikeshn Linux - General 1 12-19-2003 02:57 PM


All times are GMT -5. The time now is 04:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration