You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Hi all,
Running out of space on my mac, so trying to clear it out a bit. I have jpeg and raw copies of a lot of pictures, so want to delete all the jpegs. Is there an easy way to select just the jpegs in Finder - they are currently alternating jpeg and raw? Sorting by image size or type doesn't do anything.
Thanks,
Duane.
Do a search and delete them from there.
Or in terminal:
rm *.jpg
would delete any files ending .jpg in that folder. They'll be gone with no warning or recycle bin tho, so be careful!
Oh and by search i mean type:
"kind:jpeg"
in the search box of finder, that'll find any jpegs with whatever extension. Should be obvious how to choose current folder (rather than the whole mac!)
Thanks. Searching a folder is good, but it also comes up with any jpegs in a folder within that folder - so risk deleting those by accident if I'm not careful.
Oh, and "disk inventory X" is a good app to see where all your space has gone.
I'd have though sorting by size would make this easy?
If that doesn't work, then this may be a job for the terminal...
Something like
find /path-of-folder -name "*.jpg"
will list all of the jpegs in a folder (And folders below that).
If you are confident that all of these files can be removed then
[b]
*DISCLAIMER - This bit will remove files!!! DO NOT DO THIS UNLESS YOU ARE SURE!
[/b]
find /path-of-folder -name "*.jpg" -delete
Will delete them as well.
Thanks. Searching a folder is good, but it also comes up with any jpegs in a folder within that folder - so risk deleting those by accident if I'm not careful.
If you don't want to search recursively then please ignore my advice above.
You can do
ls *.jpg
to list all jpegs, and as IA says above,
rm *.jpg
to remove them
Ok if you want just in a folder, the best way I know is the command line. Be careful though (or update your backups first!):
In terminal, you change folder with "cd", list files with "ls" and delete with "rm" and it'll match patterns. So "rm *.jpg" removes any file ending with .jpg.
E.g.:
Macaroni:~ iain$ cd Pictures/
Macaroni:Pictures iain$ ls
Aperture Library.aplibrary LightroomMasters
Desktop Photos Photo Booth
DoubleTake Library Photo Booth Library
Flowers-iPhone.jpg backgroundIdeas.jpg
Flowers.jpg iChat Icons
Google Photos Backup in-unsorted
Lightroom
Macaroni:Pictures iain$ ls
Aperture Library.aplibrary LightroomMasters
Desktop Photos Photo Booth
DoubleTake Library Photo Booth Library
Flowers-iPhone.jpg backgroundIdeas.jpg
Flowers.jpg iChat Icons
Google Photos Backup in-unsorted
Lightroom
Macaroni:Pictures iain$ ls *.jpg
Flowers-iPhone.jpg Flowers.jpg backgroundIdeas.jpg
Macaroni:Pictures iain$
Am I doing something wrong if when I select the "Item Arrangment" box for a folder and choose sort by Name, it doesn't sort by name - ie the list could still be:
P10209
G898
P10298
etc
In Windows rather than delete them I resize them to a much smaller size. Makes it easy to browse what's there and takes up negligible space. Should be possible on a Mac too.
Using Terminal seems overkill, why not just open the folder, change view to list and sort order by Kind. Select the first and (shift+) select the last and delete?