Knowledge
  • ⚡️ Knowledge
  • Talks I like
  • Thinking
  • Unix
  • CSS
    • CSS
  • Git
    • git
  • business
    • concepts
  • databases
    • PostgreSQL
  • dev-ops
    • Docker
    • heroku
  • javascript
    • javascript
    • Jest
    • Readme
      • General
      • Libraries
        • React_DnD
  • npm
    • npm cheatsheet
  • people
    • Active Listening
  • productivity
    • focus
    • reviews
  • reading-log
    • 12 Rules for Life
    • nonfiction
  • ruby-on-rails
    • Active Storage
    • bundler
    • file-io
    • Migrations
    • patterns
    • rake-tasks
    • views
  • stoicism
    • Notes
  • food-drink
    • coffee
      • Coffee Beans
  • tools
    • macOS
      • Things
    • services
      • Trello
Powered by GitBook
On this page
  • mkdir
  • Create intermediate directories

Unix

mkdir

Create intermediate directories

Use the -p option:

$ mkdir -p /new/also-new/new-as-well

Will create the new, also-new as well as the new-as-well dirs.

From the manpages:

Create intermediate directories as required. If this option is not specified, the full path prefix of each operand must already exist. On the other hand, with this option specified, no error will be reported if a directory given as an operand already exists. Intermediate directories are created with permission bits of “rwxrwxrwx” (0777) as modified by the current umask, plus write and search permission for the owner.

PreviousThinkingNextCSS

Last updated 2 years ago