Score:0

Keep bigger size image file and delete image files with smaller sizes of same name, using terminal command

uz flag

Keep bigger size image file and delete image files with smaller sizes of same name, using terminal command

My directory may contain a_500.jpg, a_1280.jpg BUT b_500.jpg, c_500.jpg, c_800.jpg.

So, in that case b_500.jpg is a unique image file (the biggest one).

So, i want to find all the biggest file of the same series based on "xxxxx" in xxxx_resolution.jpg, and delete the rest ones using terminal command.

How i can do that?

waltinator avatar
it flag
Read https://askubuntu.com/help/how-to-ask and https://askubuntu.com/help/formatting
user535733 avatar
cn flag
When folks are learning, I suggest breaking the problem into smaller pieces: "How to X?", "How to take the result of X and apply action Y?", "How to take the result of Y and apply action Z?" If somebody here gives you a long, complex, magical incantation that you don't quite understand and cannot maintain, then how can you be sure that it's really doing what you want?
Elias Estatistics avatar
uz flag
I have seen more complex answers and questions from mine. I am using linux many years now and i have made myself complex commands for doing things. :)
Elias Estatistics avatar
uz flag
@wailtinator problem stated, expected result stated clearly. If you like to add some more info, tell me what exactly. I have downloaded a tumblr blogpost, and has multiple size images. I want to keep the bigger ones. It is not stated so clearly?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.