I currently have this which works but isn't as tidy as I'd like; mkdir -p backup/{daily/{directories,databases,logs},weekly/{directories,databases,logs},monthly/{directories,databases,logs}} Is it possible to nest the directories,databases,logs part so as to not have to have it 3 times in the command?


No need for nesting:

mkdir -p backup/{daily,weekly,monthly}/{directories,databases,logs}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.