Having the following file hierarchy:
dir
├── dirA
│ └── snapshot
│ └── subdir1
│ └── file1
└── dirB
└── snapshot
└── subdir2
└── file2
I want to move files from each snapshot/subdir directory do the parent directory of snapshot in a single command. That would be:
dir
├── dirA
│ └── file1
│ └── snapshot
│ └── subdir1
└── dirB
└── file2
└── snapshot
└── subdir2
I've tried mv dir/*/snapshot/*/* ../../
but since the destination part ../../
is relative to the working directory it obviously does not work.
Is it possible with bash commands (since I've never written a single line of bash script)?