Well, I hope this is the right forum, first of all.
Here's my issue:
I have a lot of images stored in subfolders like this example: /Stallone/photos or /Aguilera/photos. I'd like to move all the images from the photos folders one folder up, if possible. I'm hoping maybe there's a SSH command to do this.
Basically, in the example above, I want to move all the Aquilera's images from /Aquilera/photos folder to /Aguilera folder.
Does anyone know how to do this?
I can't do it by copy/paste, there are to many folders.
Jump to Post
$ pushd /Stallone/photos $ mv * ../ $ popd $ pushd /Aguilera/photos $ mv * ../ $ popd
Of course, this moves everything in the photos directory up one level - including other directories. You could limit that with globbing. For instance
mv *.png ../would …
Jump to Post
Let me make sure I understand. You have possibly thousands of folders that all contain a subdirectory called
photos. In that subdirectory there are possibly many more image files you would like to have moved up one directory.
First, I'm not sure what you get out of …
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.