Image sorting with oneliners

I have many images on my devices, which can become messy after a while. Today I like to have all my images from my (old) Nokia N95 archived in two (year) folders:

Tip: This require installing the exif package.
Note: The quotes and -I templating is needed as some files contained spaces within them.

First find me all pictures including the thumbnails and other junk from some old photo editing software program and store them in an folder called /media/RICK_250GB/Pictures/N95/ :

$ find . | grep -i 'jpg$' | grep -v '/\.' | grep -v 'Data\.noindex'  |\
  xargs -n 1 -I % sh -c "exif '%' | grep -q 'N95' && \
  cp '%' /media/RICK_250GB/Pictures/N95/"

Some other raw pictures also got included, I only want the ones from the N95 which have exact 11 digits and have prefix jpg. So get rid of all others:

$ cd /media/RICK_250GB/Pictures/N95/
$ ls | grep -v -E '^[0-9]{11,11}\.jpg*' | xargs -n 1 -I % rm '%'

Now store all in the correct folder:

$ cd /media/RICK_250GB/Pictures/N95/
$ mkdir 2008 2009 2010
$ ls * | xargs -n 1 -I % sh -c 'echo mv % `exif -t 0x9003  -m % | cut -c 1-4`/%' | sh

Attachments (1)

Download all attachments as: .zip

Comments

2. anonymous -- 5 months ago

The one liner device can be used for the image sorting. You may know the edubirdie during the sorting of the image. The Nokia has the power to work for you.

3. Henrietta Jones -- 3 months ago

Do they also support .xml files for an image sorting code? I might use this for | a student project product launching though.

4. anonymous -- 3 weeks ago

I want you to thank for your time of this wonderful read!!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog! life insurance chicago

5. anonymous -- 3 weeks ago

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Cookies near me

6. anonymous -- 3 weeks ago

Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job! Truth or Dare Questions

7. anonymous -- 3 weeks ago

The material and aggregation is excellent and telltale as comfortably. Hero Instinct

8. anonymous -- 3 weeks ago

so happy to find good place to many here in the post, the writing is just great, thanks for the post. His Secret Obsession

9. anonymous -- 3 weeks ago

I read your post and I found it amazing! thank! Hero Instinct

10. anonymous -- 3 weeks ago

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information... ExpressVPN

11. anonymous -- 3 weeks ago

I think about it is most required for making more on this get engaged ExpressVPN Review

12. anonymous -- 3 weeks ago

Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. His Secret Obsession

13. anonymous -- 3 weeks ago

I read your post and I found it amazing! thank! Relationship Rewrite Method

14. anonymous -- 3 weeks ago

Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job! Text Chemistry

15. anonymous -- 3 weeks ago

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. His Secret Obsession

16. anonymous -- 3 weeks ago

I am hoping the same best effort from you in the future as well. In fact your creative writing skills has inspired me. Text Chemistry

17. anonymous -- 3 weeks ago

I read your post and I found it amazing! thank! Make Him Worship You

18. anonymous -- 3 weeks ago

Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject! Make Him Worship You

19. anonymous -- 3 weeks ago

Nice blog. Found this while searching through Knock Knock Jokes

20. anonymous -- 3 weeks ago

This was incredibly an exquisite implementation of your ideas How To Ride A Guy

21. anonymous -- 3 weeks ago

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Logo Maker

22. anonymous -- 3 weeks ago

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Hero Instinct

23. anonymous -- 3 weeks ago

A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one. Cheesy and Funny Pick-up Lines

24. anonymous -- 3 weeks ago

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging, Conversation Starters

25. anonymous -- 3 weeks ago

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Trimtone Fat Burner

26. anonymous -- 3 weeks ago

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Trimtone

27. anonymous -- 2 weeks ago

I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing. seo

28. anonymous -- 2 weeks ago

This website and I conceive this internet site is really informative ! Keep on putting up! asbestos removal

29. anonymous -- 2 weeks ago

Amazing knowledge and I like to share this kind of information with my friends and hope they like it they why I do siding contractor

30. anonymous -- 2 weeks ago

I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read !! I definitely really liked every part of it and i also have you saved to fav to look at new information in your site. www.profitdonationcapitalism.org

31. anonymous -- 2 weeks ago

This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works stucco installation

32. anonymous -- 2 weeks ago

It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more things about it! siding contractor

33. anonymous -- 2 weeks ago

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it. tree trimming

34. anonymous -- 2 weeks ago

I really enjoy reading and also appreciate your work. landscaping

35. anonymous -- 2 weeks ago

A debt of gratitude is in order for sharing the information, keep doing awesome... I truly delighted in investigating your site. great asset... asbestos removal

36. anonymous -- 2 weeks ago

Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! reticulation

37. anonymous -- 2 weeks ago

I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day! roof insulation

38. anonymous -- 2 weeks ago

With so many books and articles coming up to give gateway to make-money-online field and confusing reader even more on the actual way of earning money, tree removal

39. anonymous -- 2 weeks ago

The worst part of it was that the software only worked intermittently and the data was not accurate. You obviously canot confront anyone about what you have discovered if the information is not right. landscaping

40. anonymous -- 2 weeks ago

It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing. insulation remover

Add New Comment