1

How can I create every folder (A-Z) in Alphabet with the help of a shell script in Linux?

I want to have the following folder structure (for illustration):

/mnt/ext_hdd/A
/mnt/ext_hdd/B
/mnt/ext_hdd/C

and so on.

2

Simple brace expansion:

mkdir -p /mnt/ext_hdd/{A..Z}

If you want all possible combinations, you could of course do {A..Z}{A..Z} and so on. If you want to test it, add an echo before the whole command.

| improve this answer | |

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.