I'm trying to move the following move a large number of files that exist in the following structure to a /mnt/originals but I need to maintain the structure at the same time. I know cp would be a solution but can't use cp because of space limitations.
/mnt/originals-us/4 /mnt/originals.us/4/0b9 /mnt/originals.us/4/0b8 /mnt/originals.us/4/0b4 /mnt/originals.us/4/0b3 /mnt/originals.us/4/0b9/a62/ /mnt/originals.us/4/0b9/a47/ /mnt/originals.us/4/0b9/f0f/ /mnt/originals.us/4/0b9/a62/aa5/file16.png /mnt/originals.us/4/0b9/a62/ba1/file1.png /mnt/originals.us/4/0b9/a47/31f/file3.mov /mnt/originals.us/4/0b9/f0f/ . . .
Etc. It is a pretty large set of files of different file names and types. I tried the following but it didn't work.
mv /mnt/originals-us/ /mnt/originals/
but get the following
mv: inter-device move failed: `/mnt/originals-us/10/0b9/' to `/mnt/originals/10/0b9'; unable to remove target: Is a directory
I also thought about writing a massively chanin-ed command but I don't think that would work either.
This is what I have so far.
find . -type f -print | rev | cut -d '/' -f1 | rev
This obviously gives me all the filenames but how do I chain it with the first part?