I'm using the following command to move all files (non-recursively) ended in _128.jpg into the 128x160 subdir. This works great.
find . -iname '*_128.jpg' | xargs -I '{}' mv {} 128x160
But I also need to remove the _128 suffix from each file. Also, I must keep my current xargs method, making an exec for each would make the process extremely longer.
Thanks in advance for your cooperation!
Something like this should do the trick :
Here i have used a multiple commands approach using
sh -c 'command1; command2'
andsed
to clear_128
in the filename.