I have a large number of small files, f, arranged in a directory structure like so:
/A/B/C/f
There are 11 directories at the level of A, each with about 100 directories at the level of B, each with about 30 directories at the level of C, each with one file f.
How do I move all files f up one level? For example, given this set of files...
/A/B/C/f1
/A/B/C/f2
/A/B/C/f3
/A/B/C/f4
I want the directory /A/B/
to contain 4 files, f1 through f4. Removing directories C is not necessary.
I'm hoping this is a solved problem, possibly involving find
, xargs
, and whatnot
. Any ideas?
Cheers,
James