I have the following directory structure:
$ directory tree Data
Data
├── Mercury
├── Venus
├── Earth
│ ├── Australia
│ └── Asia
│ └── Japan
| └── Hokkido
├── Mars
├── HellasBasin
└── SyrtisCrater
How can rename/number/label all the directories recursively to get a result similar to the following?
Data
├── 01
├── 02
├── 03
│ ├── 031
│ └── 032
│ └── 0321
| └── 03211
├── 04
├── 041
└── 042
The idea is to rename the whole tree with new names (numbers, letters or combination of them). They don't necessary have to have labels like 03211.
Thanks in advance for your time.
Using bash:
Initially:
Then: