CtrlK
BlogDocsLog inGet started
Tessl Logo

mkdir

Create directories. Use when making new directories, creating nested directory structures, or setting directory permissions at creation time.

76

Quality

95%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

mkdir - Create Directories

Synopsis

mkdir [OPTION]... DIRECTORY...

Create the DIRECTORY(ies), if they do not already exist.

Flags

FlagLong FormDescription
-p--parentsCreate parent directories as needed, no error if existing
-m--mode=MODESet file mode (permissions), like chmod
-v--verbosePrint message for each created directory
-ZSet SELinux security context
--context[=CTX]Like -Z, or set SELinux/SMACK context to CTX
--helpDisplay help
--versionOutput version

Examples

# Create a single directory
mkdir mydir

# Create nested directory structure
mkdir -p path/to/nested/dir

# Create with specific permissions
mkdir -m 755 mydir

# Create multiple directories
mkdir dir1 dir2 dir3

# Verbose creation
mkdir -pv path/to/deep/dir

# Create with restricted permissions
mkdir -m 700 private_dir

Gotchas

  • Without -p, mkdir fails if the parent directory doesn't exist or if the directory already exists.
  • With -p, no error is reported for existing directories, and parent directories are created with default permissions modified by umask, regardless of the -m flag. Only the final directory gets the -m permissions.
  • The -m flag accepts the same format as chmod: numeric (755) or symbolic (u=rwx,g=rx,o=rx).
Repository
flox/floxenvs
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.