Linux Lite Forums

Development => Scripting and Bash => Topic started by: bitsnpcs on July 24, 2017, 02:04:06 PM

Title: Genre/s plus A to Z directories in 1 command
Post by: bitsnpcs on July 24, 2017, 02:04:06 PM
Hello,

Open the terminal by holding down Ctrl and Alt keys and pressing t (Ctrl+Alt+t)

change to your Music directory

Code: [Select]
cd Music
Example 1 - Lets make a music genre directory (named reggae), and 26 folders A thru Z inside this in 1 command -

Code: [Select]
mkdir -p reggae/{A..Z}
Or

Example 2 - Lets make a music genre directory (named reggae), and 2 sub-genre directories named dancehall, and lovers-rock, with 26 folders in each sub-genre folders A thru Z, thats 55 folders in 1 concise command  8)

Code: [Select]
mkdir -p reggae/dancehall/{A..Z} reggae/lovers-rock/{A..Z}

Similar can be tried in video folder, pictures folder, or document folder.