“mkdir” command tips and tricks

Create a normal directory ( folder )

mkdir myroot

Create multiple directories at once

mkdir dir1 dir 2 dir3 
mkdir {dir1,dir2,dir3}
mkdir dir{1..3}
rm -d dir{1..3}

Create a directory with the current date

mkdir `date ‘+%y%m%d’`

Basic but i think useful stuff

mkdir -p myroot/project-name/src

Now we can combine many options:

mkdir -p `date '+%y%m%d'`/{1,2,3}
20211114/1
/2
/3

That’s it for now

--

--

--

Full stack developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hybrid APPs Vs Native APPs: What is best for your business?

Hybrid Vs Native Apps

Brave New Android World with AssistedInject

What is Networking? — THM Walkthrough

Create Moving Platform in Unity

How to debug? (Tips for newbies)

Overview of RegularExpressions

Using a Makefile with Your Web App

PDF Generator API 2021 Recap: Small Company, Big Dreams

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brainless

Brainless

Full stack developer

More from Medium

How to got rid of the last any in your TypeScript Code

How to Get Started With GraphQL

How to Get Started With GraphQL

Build and Run Your First Node.js Application with Bazel

Stop Installing Node.js and Global Npm Packages, Use Docker Instead