Solved

How to create directories recursively using mkdir

Posted on 2010-09-09
2
523 Views
Last Modified: 2012-05-10
I need to be able to create directories recursively.
Suppose I have the following directory structure that needs to be created /release/projecta/backup_011009/uk

The directory /release/projecta exists, but the path backup_011009/uk does nto exist.

How can I use mkdir to recursively create  all directories?

Thanks in advance
0
Comment
Question by:singh101
2 Comments
 
LVL 14

Accepted Solution

by:
sentner earned 500 total points
ID: 33638799
mkdir -p /release/projecta/backup_011009/uk
0
 

Author Closing Comment

by:singh101
ID: 33638834
Thanks for the quick response
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question