• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

wBlogs

The World Blog Archived

  • Submit
  • Disclaimers
  • About
  • DMCA
  • Privacy Policy
  • Contact
You are here: Home / How to Create Multiple Subdirectories with One Linux Command

How to Create Multiple Subdirectories with One Linux Command

If you want to create a directory containing several subdirectories, or a directory tree, using the command line in Linux, generally you have to use the mkdir command several times. However, there is a faster way to do this. Let's say we've created a directory called htg, and want to create four subdirectories within it. In a normal situation, we'd use the mkdir command to create the htg directory. Then, we'd need the cd command to change to the new htg directory and, finally, we we'd use the mkdir command again four times to create the four subdirectories. This can all be combined into one command, and we'll show you how. To create a new directory with multiple subdirectories you only need to type the following command at the prompt and press Enter (obviously, change the directory names to what you want). mkdir -p htg/{articles,images,note,done} The -p flag tells the mkdir command to create the main directory first if it doesn't already exist (htg, in our case). The words in the brackets are part of the "brace expansion list". Each of the items in the brace expansion list is appended separately to the preceding path (htg/). Advertisement For example, the above command is expanded into htg/articles,… Read full this story

  • How to Use Multiple Email Signatures in Gmail
  • Spotify introduces Group Session feature that lets multiple users create and control playlists in real-time
  • How to Use tmux on Linux (and Why It’s Better Than Screen)
  • Securing Linux's master sysadmin command: Sudo
  • What Is a “Zombie Process” on Linux?
  • How to Create Photo Planets from Panoramic Photographs
  • Nasscom task force creates an end-to-end Covid-19 platform for Telangana
  • Ghost Of Tsushima: When New Gameplay Will Be Revealed, Release Date, And Everything Else We Know
  • How to offload your iTunes library to a NAS
  • Best free and public DNS servers of 2020 : Alternative domain name servers for businesses and individuals
How to Create Multiple Subdirectories with One Linux Command have 331 words, post on www.howtogeek.com at October 11, 2016. This is cached page on wBlogs. If you want remove this page, please contact us.

Primary Sidebar

RSS Recent Stories

  • It’s Bunny Folger’s world in Only Murders In The Building episode 3
  • Thor: Love And Thunder trades on Hemsworth’s charm, and tests Waititi’s
  • Netflix greenlights “Groundhog Day-esque” Swedish comedy One More Time
  • Stranger Things season 5 will have (mostly) shorter episodes
  • Google Chrome Is Under Attack: Update Right Now

Sponsored Links

  • Today’s Best Deals – Friday 27th September
  • Step Right Up: Doordash Is The Latest To Report A Data Breach
  • Hanes Men’s 4-Pack FreshIQ Black T-Shirts For $5 From Amazon!
  • HURRY! Get A Free 1 Year Subscription To Popular Science!
  • Today Only: Save On Motorola Smartphones From Amazon
  • RAVPower 60W 6-Port USB Charging Station For $15.79 From Amazon
Copyright © 2022 wBlogs. Power by Wordpress.
Home - About Us - Contact Us - Disclaimers - DMCA - Privacy Policy - Submit your story