LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-11-2005, 06: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, 06: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, 06:29 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
find /home/ravencrow -iname "*.jpg"
 
Old 08-13-2005, 03: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



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

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

All times are GMT -5. The time now is 03:39 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
Open Source Consulting | Domain Registration