Move files contained in a certain dir to the previous one (centOS)
- by Alex
i will try to explain my problem (sorry for my bad english).
I have an image gallery with a directory structure like that:
images/dir1/subdir1/IMG/files.jpg
images/dir1/subdir2/IMG/files.jpg
images/dir1/subdir3/IMG/files.jpg
images/dir2/subdir1/IMG/files.jpg
.......
images/dir109/subdir1/IMG/files.jpg
the directory named images contains 109 dirs (dir1,dir2, ... dir109), the 109 dirs totally have 1200 subdirs inside, every subdir contain a dir named IMG with images into it (file1.jpg file2.jpg etc ...), i would like to move all the images contained into every dir named IMG into the previous dir (subdir) to have something like that:
images/dir1/subdir1/file1.jpg
images/dir1/subdir1/file2.jpg
images/dir1/subdir2/file1.jpg
........
images/dir109/subdir1/file.jpg