Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Find all JPEG files in a directory

by salva (Abbot)
on Aug 11, 2005 at 20:39 UTC ( #483124=note: print w/replies, xml ) Need Help??


in reply to Find all JPEG files in a directory

you can use the file command to obtain the type of the files:
$ file -i /foo/bar/* | perl -ne 'print "$1\n" if /(.*):\s*image\/jpeg$ +/'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://483124]
help
Chatterbox?
[SuicideJunkie]: Parse a serial number from a register. But it is humans that type it in originally.
[SuicideJunkie]: No respect for buffer sizes... give them a byte, they take three :D

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2016-12-07 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.