md

Create a directory together with every missing path level and optionally set its permissions in the same command.

FilesVersion 1.2.1Stable
lil-terminal

Overview

md turns a complete directory path into one operation: a path such as sandbox/tmp/first/second can create every missing level in the chain, and an octal mode can be applied at the same time. This is especially useful in deployment and .lil workflows where directory structure must be reproducible.

Build a directory structure in one step

Create the whole directory path in one command, then move into it or create files inside it; there is no need to build each level separately.

Syntax

lil-terminal
md <path> [-MODE|-m MODE]

Reference

md <path>

create a directory (and any missing directories in the path)

md <path> -0755

create the directory and set octal permissions

md <path> -m 0755

set permissions in UNIX mode format (with the mode option)

Nested paths

md sandbox/tmp/first/second -0777 creates every missing level through second in a single command. This is useful for repeatable deployment and .lil workflows because the required directory structure does not have to be built one level at a time.

Safety

The path is resolved from the current terminal directory. Existing files are never replaced by directories. After a successful change md returns the same compact flat view used by cd instead of expanding a recursive tree.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Create a directory (and any missing directories in the path)

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install md
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install md -m
Exact public version

Install exactly this published version.

install md -v 1.2.1
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade md
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install md -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Create a directory (and any missing directories in the path)
cd \sandbox\tmp | md project/assets | md project/cache | cd project
project/
  assets/

project/
  assets/
  cache/

assets/
cache/
Create the directory and set octal permissions
md sandbox/tmp/private -0700
tmp/
(private created; final mode 0700)
Set permissions in UNIX mode format (with the mode option)
md sandbox/tmp/public -m 0755
tmp/
(public created; final mode 0755)
Create a directory (and any missing directories in the path)
md sandbox/tmp/first/second -0777
tmp/
(directory chain created through first/second; final mode 0777)
Create a directory (and any missing directories in the path)
md \sandbox\README.txt\child
Directory creation failed

File used in this example: sandbox/tmp/README.txt

The example uses a file or directory from the protected /sandbox/ documentation workspace.

lil-terminal sandbox temporary workspace

Commands in the public documentation use this directory for disposable copies,
archives, uploads and files created during examples. Review destructive commands
before running them and restore the sandbox from the release package when needed.

Related documentation

Current public release

v1.2.12026-08-08

Nested directory workflow

Documents creation of an entire missing directory chain and returns a compact flat directory view after success.