# mkdir -p and Beyond: Creating Nested Directories for Genomic Projects

Every sequencing project starts the same way. You have raw reads, a reference, scripts, logs, and results, and you need somewhere to put all of it before you run a single command. The fastest reliable way to build that structure on the command line is `mkdir -p`, a single flag that turns a one-directory-at-a-time chore into one reproducible command that builds an entire nested tree.

By the end of this article you will be able to:

- Explain exactly what `mkdir -p` does and why it behaves differently from plain `mkdir`
- Scaffold a complete genomic project directory tree with one command using brace expansion
- Verify the structure you created with `ls`, `find`, and `tree`
- Diagnose and fix the exact error messages `mkdir` produces, including "Permission denied", "File exists", and "Not a directory"
- Wrap the whole pattern into a small, reusable shell script you can run at the start of every project

You need a shell running on Linux, macOS, or Windows through WSL2 (Windows Subsystem for Linux). Bash or zsh both work. Nothing else needs to be installed, and every command shown here is a standard part of the shell environment described by the POSIX standard and the GNU Coreutils manual, the two documents that define how `mkdir` behaves.

## Why Directory Structure Matters Before You Download a Single Read

Raw sequencing data is expensive and often irreplaceable. A re-sequenced library costs money, and a clinical or historical sample may not exist anymore. The single most common cause of lost or corrupted raw data in genomic work is a script that wrote over the `raw` directory during a debugging session. A directory layout that physically separates immutable raw inputs from overwritable intermediates removes that risk before it exists.

A second reason is reproducibility. When a collaborator, reviewer, or your own future self opens a project six months later, the layout is the documentation. If reads live in `data/raw`, trimmed reads in `data/trimmed`, genome indices in `reference`, and per-tool output in `results`, anyone can guess where a file belongs. Many workflow managers used in genomics, including Nextflow and Snakemake, assume or encourage this separation, and their documentation recommends publishing a project layout alongside the code so that the structure travels with the analysis.

A third reason is automation. Scripts, workflow managers, and continuous integration systems work best when paths are predictable. A directory created by a command in a script is a documented fact. A directory created by hand at 11 p.m. is a fact nobody recorded. Building the skeleton with `mkdir -p` inside a setup script means every project in a lab starts life with the same shape, which makes downstream scripts portable between projects.

This is the foundation of practical linux for bioinformatics: the filesystem is the first data structure you manage, and you manage it with a handful of linux commands bioinformatics users rely on daily. `mkdir -p` is the first of them.

## mkdir -p Explained: Syntax, Behavior, and Exit Status

The `mkdir` command creates directories. Its basic form, documented in both the POSIX standard and the GNU Coreutils manual, is:

```bash
mkdir [options] directory_name...
```

Plain `mkdir` does two things that matter for real work:

1. It fails if a parent directory in the path does not exist.
2. It fails if the target directory already exists.

Run it against a missing parent and you see the first failure immediately:

```bash
mkdir project/analysis/qc
```

```
mkdir: cannot create directory 'project/analysis/qc': No such file or directory
```

Neither `project` nor `analysis` exists yet, so `mkdir` refuses to create `qc` underneath them. You could create each level in turn:

```bash
mkdir project
mkdir project/analysis
mkdir project/analysis/qc
```

That works, but it does not scale. Real genomic projects have dozens of directories spread across several levels, and typing each level separately is slow and error prone. The `-p` option solves both problems at once. Per the POSIX standard, `-p` creates each missing parent directory in the path as needed, and it does not report an error if the target directory already exists. The GNU Coreutils manual describes the same behavior: create parent directories as needed, no error if existing.

So this single line replaces the three lines above:

```bash
mkdir -p project/analysis/qc
```

### What -p Actually Does, Step by Step

![Four step flow showing mkdir -p checking and creating each level of project/analysis/qc, then exiting with status 0.](/article-images/illustrations/mkdir-p-bioinformatics-mkdir-p-steps.webp)

When you run `mkdir -p project/analysis/qc`, the command:

1. Checks whether `project` exists. If not, it creates it.
2. Checks whether `project/analysis` exists. If not, it creates it.
3. Checks whether `project/analysis/qc` exists. If not, it creates it.
4. Exits with status 0 (success) whether or not it had to create anything.

That last point is why `mkdir -p` is the idiom inside scripts. If you run the same setup script twice, the second run changes nothing and still reports success. Scripts that begin with idempotent setup lines, meaning lines that produce the same result no matter how many times they run, are far easier to maintain than scripts that crash on the second run.

### The Options That Matter

The POSIX standard defines two options for `mkdir`, `-p` and `-m`. GNU and BSD implementations add a few convenient extras. The table below summarizes the ones you will actually use in bioinformatics work.

| Option | What it does | Example |
|--|--|--|
| (none) | Creates one or more directories, fails on missing parents or existing targets | `mkdir data` |
| `-p` | Creates all missing parent directories, treats an existing directory as success | `mkdir -p project/data/raw` |
| `-m` | Sets the permission mode at creation time (may be combined with `-p`) | `mkdir -p -m 700 project/secrets` |
| `-v` | Prints one line per directory created (available on Linux and macOS, verify with your local manual) | `mkdir -pv project/logs` |

Two details worth knowing:

- GNU coreutils also accepts long-form equivalents of these options, spelled out as words instead of single letters. The short forms are universal, which is why guides and scripts use them.
- `-v` combined with `-p` shows you exactly what was created, which is the safest mode to work in while you are learning.

### Exit Status: How Scripts Know It Worked

Every command on a Unix-like system reports success or failure through an exit status. By convention, 0 means success and anything else means failure. `mkdir` follows this convention, and you can see it directly:

```bash
mkdir -p project/logs
echo $?
```

```
0
```

If creation fails, for example because a path component is a file rather than a directory, the status is nonzero and the shell prints an error to standard error. Workflow scripts and workflow managers check this status. When you later write pipelines, a line like `mkdir -p "$outdir"` followed by commands that assume the directory exists is safe only because `mkdir` guarantees through its exit status that the directory is there before the next line runs.

## A Step-by-Step Walkthrough: Scaffolding a Genomic Project

This section is the practical core of using mkdir -p in bioinformatics, step by step. Follow it in order on your own machine. The example project is an RNA-seq analysis, but the layout generalizes to whole-genome sequencing, metagenomics, and variant calling with only the subdirectory names changed.

### Step 1: Know Where You Are

Before creating anything, confirm your location. Almost every "my files vanished" incident starts with creating directories somewhere other than where the user thought they were.

```bash
pwd
ls
```

```
/home/zkhalid
projects  reference_data  software
```

`pwd` prints the working directory. `ls` lists its contents so you can see what already exists. If you are in your home directory, which on Linux is something like `/home/yourname` and on macOS is `/Users/yourname`, you are in a safe place to create a project.

### Step 2: Create the Project Root With a Naming Convention

```bash
mkdir -p ~/genomics/Cho-2026-rnaseq
cd ~/genomics/Cho-2026-rnaseq
```

Note the naming pattern: investigator last name, year, assay type, all lowercase, no spaces. Conventions like this sort chronologically in directory listings and never require quoting. Avoid spaces and special characters in directory names because many command-line tools, especially older ones and some workflow components, mishandle them.

### Step 3: Build the Full Tree in One Command

Here is where the "and beyond" part begins. Bash brace expansion lets one `mkdir -p` command create many directories, including nested ones:

```bash
mkdir -pv data/raw data/trimmed reference scripts logs metadata \
results/{qc,alignments,counts,de}
```

```
mkdir: created directory 'data'
mkdir: created directory 'data/raw'
mkdir: created directory 'data/trimmed'
mkdir: created directory 'reference'
mkdir: created directory 'scripts'
mkdir: created directory 'logs'
mkdir: created directory 'metadata'
mkdir: created directory 'results'
mkdir: created directory 'results/qc'
mkdir: created directory 'results/alignments'
mkdir: created directory 'results/counts'
mkdir: created directory 'results/de'
```

The backslash at the end of the first line continues the command onto the next line. The braces around `qc,alignments,counts,de` expand into four separate paths, each combined with the `results/` prefix, and `-p` creates `results` itself because it did not exist yet. Brace expansion is a feature of bash and zsh, the two shells almost everyone uses for bioinformatics, and the GNU Coreutils manual and bash manual both document it as a shell feature rather than a `mkdir` feature, which is why it does not work in minimal POSIX shells.

A more compact equivalent uses nested braces:

```bash
mkdir -p data/{raw,trimmed} results/{qc,alignments,counts,de} \
reference scripts logs metadata
```

### Step 4: Add a README to Each Directory

An empty directory carries no information about what belongs in it. A one-line `README.md` in each directory fixes that. A short shell loop writes them all at once:

```bash
for d in data/raw data/trimmed reference scripts logs metadata \
results/qc results/alignments results/counts results/de
do
  echo "# $(basename "$d")

Describe the contents of this directory here." > "$d/README.md"
done
```

The `basename` command strips the path and keeps the final name, so each README names its own directory. You then edit the description line in each file with any text editor. Five minutes here saves an hour of guesswork later, and it gives collaborators something to read before they ask you where the count matrices went.

### Step 5: Protect the Raw Data Directory

Once raw sequencing files arrive, make the directory read-only for everyone. This is a soft protection, an admin or the file owner can reverse it, but it stops the most common accident, which is an accidental overwrite by a script with the wrong output path.

```bash
chmod a-w data/raw
```

To add new files later, restore write permission with `chmod u+w data/raw`, copy the files in, then remove write permission again. Labs that follow this habit almost never lose raw data to stray commands.

### Step 6: Verify the Structure

The `tree` command draws the directory hierarchy in your terminal. It is not installed by default on every distribution, so if it is missing, install it with your package manager, for example `sudo apt install tree` on Debian-based systems or `brew install tree` on macOS.

```bash
tree -L 2
```

```
.
├── data
│   ├── raw
│   └── trimmed
├── logs
├── metadata
├── reference
├── results
│   ├── alignments
│   ├── counts
│   ├── de
│   └── qc
└── scripts
```

If `tree` is not available, `find` and `sort` produce a flat but complete listing:

```bash
find . -type d | sort
```

```
.
./data
./data/raw
./data/trimmed
./logs
./metadata
./reference
./results
./results/alignments
./results/counts
./results/de
./results/qc
./scripts
```

The `-type d` flag limits output to directories. Piping to `wc -l` gives you a count to compare against expectations:

```bash
find . -type d | wc -l
```

```
13
```

Thirteen is correct here: the project root plus twelve created directories. Running this check immediately after setup catches the classic failure mode of `mkdir -p`, which is that it silently accepts paths you did not intend to type. That failure mode is covered in detail under common mistakes below.

### Step 7: Turn It Into a Reusable Script

The real payoff of the mkdir -p bioinformatics step-by-step pattern is never typing it again. Save the following as `new_project.sh` in a `bin` directory inside your home folder:

```bash
#!/usr/bin/env bash
set -euo pipefail

if [ $# -ne 1 ]
then
  echo "usage: new_project.sh PROJECT_NAME" >&2
  exit 1
fi

project="$1"
mkdir -p "$project"/{data/raw,data/trimmed,reference,scripts,logs,metadata} \
"$project"/results/{qc,alignments,counts,de}

echo "created project skeleton in $project"
```

Run it like this:

```bash
bash new_project.sh Chen-2026-wgs
```

```
created project skeleton in Chen-2026-wgs
```

Three details make this script safe:

- `set -euo pipefail` makes bash stop on the first failed command, treat unset variables as errors, and propagate failures through pipes. Without it, a failed `mkdir` would be ignored and later commands would run against a missing directory.
- `"$project"` is quoted everywhere it appears, so a project name containing a space still creates a single directory.
- The script takes the project name as its first positional argument, `$1`, and prints a usage message if exactly one argument was not supplied.

Every project in your lab can now start from the same skeleton, which is the practical meaning of reproducibility at the filesystem level.

## Beyond mkdir -p: Shell Techniques That Save Hours

Once the basic pattern is second nature, several related techniques handle the messier cases that show up in real projects.

### Brace Expansion With Numeric Ranges

Sample directories are the most common repeated structure in genomics. Brace expansion accepts numeric ranges with zero padding:

```bash
mkdir -pv samples/sample_{001..012}
```

```
mkdir: created directory 'samples'
mkdir: created directory 'samples/sample_001'
mkdir: created directory 'samples/sample_002'
...
mkdir: created directory 'samples/sample_012'
```

The zero-padded range `{001..012}` produces `sample_001` through `sample_012`, and zero padding matters because it keeps the directories sorting correctly in listings and in tools that read files in lexicographic order.

### Nested Braces for Paired Structures

If each sample has the same internal layout, nest the braces:

```bash
mkdir -p analysis/{QC,alignment}/{sampleA,sampleB,sampleC}
```

This creates `analysis/QC/sampleA`, `analysis/QC/sampleB`, `analysis/QC/sampleC`, and the same three under `analysis/alignment`, six directories from one command.

### Creating Directories From a Sample Sheet

When sample names live in a table, generate the directories from the table itself so the filesystem always matches the metadata. Given a tab-separated file `samples.tsv` whose first column holds sample IDs:

```bash
cut -f1 samples.tsv | tail -n +2 | xargs -I{} mkdir -p results/counts/{}
```

`cut -f1` extracts the first column, `tail -n +2` skips the header row, and `xargs -I{}` runs `mkdir -p` once per sample, substituting the sample name for `{}`. Now the structure is derived from the sample sheet rather than typed by hand, which eliminates an entire class of transcription errors.

### Creating a Directory With Specific Permissions in One Step

On shared systems, directories sometimes need restricted permissions from birth. The `-m` option sets them at creation:

```bash
mkdir -p -m 700 ~/genomics/embargoed-2026
```

Permission `700` means the owner can read, write, and enter the directory, and nobody else can. This matters for human-identifiable genomic data, which most institutional policies treat as sensitive regardless of species. For routine shared analysis directories, the default behavior is usually right, which the next section explains.

### The install -d Alternative

GNU coreutils provides `install`, a command mostly used to copy files, whose `-d` mode creates directories exactly like `mkdir -p -m`, setting permissions in the same command. You will see it in installation scripts. For everyday bioinformatics work, `mkdir -p` is the standard choice, and `install -d` mainly appears in packaged scripts where permissions must be set atomically.

## Checking the Result: Verification Commands That Catch Problems

Creating the structure is only half the job. Verifying it takes under a minute and catches typos before they propagate into scripts.

**List what exists, with permissions.** The command `ls -la` shows all entries including hidden ones, and the first column encodes permissions. A freshly created directory under a typical umask of `022` shows as `drwxr-xr-x`, meaning the owner can write and everyone else can read and enter but not write.

**Print the full tree.** As shown above, `tree -L 2` gives a two-level view and `tree` alone gives the full depth. For projects with per-sample subdirectories, cap the depth or the output becomes noise.

**Count directories against your plan.** If your skeleton defines twelve directories, `find . -type d | wc -l` should return thirteen including the root. Any other number means a typo created something unexpected or something is missing. This two-second check is the single highest-value verification habit in this article.

**Check a specific path exists and is a directory.** The `test` built-in does this inside scripts:

```bash
if [ -d results/counts ]
then
  echo "counts directory present"
else
  echo "counts directory missing" >&2
  exit 1
fi
```

`-d` tests for a directory specifically, so it also catches the case where a file with the same name is squatting on the path.

**Confirm what the shell sees.** `realpath` resolves a relative path to an absolute one, which is useful when a script behaves differently from what you expected:

```bash
realpath results/counts
```

```
/home/zkhalid/genomics/Cho-2026-rnaseq/results/counts
```

## Common Mistakes and Limitations

![Decision tree sorting mkdir errors into Permission denied, File exists and Not a directory, each with its fix, ending in a count check.](/article-images/illustrations/mkdir-p-bioinformatics-mkdir-error-triage.webp)

These are the failures that actually happen on real systems, with the exact messages and fixes. Most of them follow from one property of `-p`: it never asks questions. That property makes scripts robust and makes typos silent, so the burden of verification falls on you.

**Mistake 1: Unquoted paths with spaces.** Running `mkdir -p my project` creates two directories, `my` and `project`, with no warning. The fix is quoting: `mkdir -p "my project"`. The better fix is the naming convention from the walkthrough, which avoids spaces entirely so the problem never arises.

**Mistake 2: Typo propagation.** Because `-p` creates every missing parent without asking, a typo creates a real hierarchy in the wrong place. `mkdir -p projet/raw` quietly builds `projet` alongside the correctly spelled `project`, and downstream scripts pointed at the typo find an empty directory. The fixes are running `mkdir -pv` while setting up, verifying with `find . -type d | wc -l` against your expected count, and cleaning up with `rmdir -p projet/raw`, which removes empty directories in reverse along the path the same way `-p` created them.

**Mistake 3: Permission denied.** The message looks like this:

```
mkdir: cannot create directory '/scratch/shared/newproject': Permission denied
```

It means you lack write permission on the parent, usually because the parent belongs to another user or a restricted group. Check who owns it with `ls -ld /scratch/shared`, then either create the project under your own space, ask the administrator for access, or have the owner create a directory and hand it to your group. Resist the reflex to reach for root privileges for a routine project directory, because directories created as root often end up unwritable by your normal account later, which produces this same error in reverse at the worst possible time, mid-pipeline.

**Mistake 4: Assuming -p makes all "exists" cases succeed.** An existing directory at the target path is treated as success under `-p`. An existing file at the target path is not:

```
mkdir: cannot create directory 'results': File exists
```

This happens when a stray file, often one created by a misdirected redirect like `command > results`, occupies the name a directory needs. The fix is to inspect the entry with `ls -l`, move the file somewhere sensible, then rerun `mkdir -p`. A related error occurs when a path component is a file:

```
mkdir: cannot create directory 'reference.fa/g indices': Not a directory
```

Wait, that example contains a typo of its own, which makes the point cleanly. The real form is:

```
mkdir: cannot create directory 'reference.fa/g_indices': Not a directory
```

If `reference.fa` is a file, nothing can be created beneath it, and `mkdir` reports "Not a directory". The message tells you which component is the culprit, so read it rather than pattern-matching it to "Permission denied".

**Mistake 5: Assuming every system supports the same options.** The POSIX standard defines `-p` and `-m`. Options like `-v` are provided by the common implementations on Linux and macOS but are not part of the standard, so a script using `-v` can fail on a minimal or unusual system. Scripts that must run anywhere should stick to `-p` and `-m`.

**Mistake 6: Fighting the default permissions instead of understanding them.** New directories receive permissions filtered through your umask, typically `022` on Linux, which produces `755` directories that are group-readable but not group-writable. On a shared analysis server where lab members need to write into each other's directories, the usual remedy is `chmod -R g+rwX` on the project after setup, or a group-friendly umask set by the administrator. Changing umask silently inside a personal script tends to surprise collaborators, so prefer explicit `chmod` on the specific directories that need shared access.

**Mistake 7: Expecting mkdir to do more than create directories.** `mkdir -p` creates empty directories and nothing else. It does not copy data, set up version control, initialize a workflow, or back anything up. Empty directories do not travel through most backup and transfer tools, because those tools move files, and an empty directory contains no files. That is why the walkthrough populated each directory with a README, giving every directory content that backup systems can carry.

**Mistake 8: Using PowerShell syntax in a bash article.** On Windows, the closest PowerShell analog to `mkdir -p` is `New-Item -ItemType Directory -Force path`, where `-Force` provides the create-parents-and-ignore-existing behavior. If your work is genomics, install WSL2 and work in a real Linux environment, because the vast majority of genomic tools are built and tested for Unix-like systems, and mixing two shell syntaxes multiplies your error surface.

One general limitation applies to all of the above. Directory conventions are infrastructure, not science. The layout suggested here is a widely used pattern, not a mandated standard, and every lab adapts it. What matters is that your convention is written down in the READMEs and applied consistently by a script, so individual projects can deviate deliberately rather than accidentally.

## Next Steps

With the scaffold in place, the natural next skills in linux for bioinformatics build directly on what you just created:

- Move and copy data into the skeleton with `cp` and `mv`, and transfer large files with `rsync`, which resumes interrupted transfers.
- Search the tree with `find` for files by name, age, or size, and with `grep` for content inside logs and metadata.
- Put the `scripts` directory under version control with git, so the code that generated your results has its own history.
- Learn the workflow manager your field favors. Nextflow and Snakemake both create output directories as they run, but both benefit from the disciplined raw-versus-processed separation you just built, and their documentation recommends publishing project structure and parameters together so analyses can be rerun by others.

The pattern to carry forward is the one this article demonstrates: every manual action you perform more than twice becomes a command, every command becomes a script, and every script becomes part of a project anyone can rerun.

## Frequently Asked Questions

### What does mkdir -p do in bioinformatics work?

It creates a directory along with any missing parent directories in the path in a single command, and it exits successfully even if the directories already exist. That combination makes it the standard way to build and re-run project setup scripts for genomic analyses.

### Does mkdir -p fail if the directory already exists?

No. When the target path already exists as a directory, `mkdir -p` reports success and changes nothing, which is what makes setup scripts safe to run repeatedly. It still fails if a file rather than a directory occupies the target name.

### How do I create many directories at once for a sequencing project?

Combine `mkdir -p` with brace expansion, for example `mkdir -p results/{qc,alignments,counts,de}` creates four subdirectories under `results` in one command. Numeric braces like `{001..012}` generate numbered sample directories with zero padding.

### What is the difference between absolute and relative paths with mkdir?

An absolute path starts at the filesystem root, like `/home/you/genomics/project`, and works from anywhere. A relative path starts at your current directory, like `data/raw`, and only means what you expect if `pwd` says what you think it does, so check your location before creating anything relative.

### Why did mkdir give "Permission denied" and how do I fix it?

You lack write permission on the parent directory, which `ls -ld` on the parent will confirm. Create the project in your own home or scratch space, ask the owner or an administrator for access, or have them create a directory and grant your group access.

### How do I check that my directory structure was created correctly?

Run `tree -L 2` for a readable hierarchy, or `find . -type d | sort` for a complete flat list, and compare a directory count from `find . -type d | wc -l` against the number your layout plan expects.

### Does this work the same on macOS and Windows?

macOS ships the same BSD-compatible `mkdir` with `-p` support, so every command here works in the Terminal. On Windows, use WSL2 to get a real Linux environment, since the PowerShell equivalent is `New-Item -ItemType Directory -Force` and most genomic tools expect Unix-like systems.

### How do I make a reusable project setup script?

Save the mkdir -p and brace-expansion commands in a bash script that takes the project name as its first argument, quote every variable, start the script with `set -euo pipefail`, and keep the script in a shared location or under version control so the whole lab creates identical skeletons.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What does mkdir -p do in bioinformatics work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It creates a directory along with any missing parent directories in the path in a single command, and it exits successfully even if the directories already exist. That combination makes it the standard way to build and re-run project setup scripts for genomic analyses."
      }
    },
    {
      "@type": "Question",
      "name": "Does mkdir -p fail if the directory already exists?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. When the target path already exists as a directory, mkdir -p reports success and changes nothing, which is what makes setup scripts safe to run repeatedly. It still fails if a file rather than a directory occupies the target name."
      }
    },
    {
      "@type": "Question",
      "name": "How do I create many directories at once for a sequencing project?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Combine mkdir -p with brace expansion, for example mkdir -p results/{qc,alignments,counts,de} creates four subdirectories under results in one command. Numeric braces like {001..012} generate numbered sample directories with zero padding."
      }
    },
    {
      "@type": "Question",
      "name": "What is the difference between absolute and relative paths with mkdir?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "An absolute path starts at the filesystem root, like /home/you/genomics/project, and works from anywhere. A relative path starts at your current directory, like data/raw, and only means what you expect if pwd says what you think it does, so check your location before creating anything relative."
      }
    },
    {
      "@type": "Question",
      "name": "Why did mkdir give \"Permission denied\" and how do I fix it?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "You lack write permission on the parent directory, which ls -ld on the parent will confirm. Create the project in your own home or scratch space, ask the owner or an administrator for access, or have them create a directory and grant your group access."
      }
    },
    {
      "@type": "Question",
      "name": "How do I check that my directory structure was created correctly?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Run tree -L 2 for a readable hierarchy, or find . -type d | sort for a complete flat list, and compare a directory count from find . -type d | wc -l against the number your layout plan expects."
      }
    },
    {
      "@type": "Question",
      "name": "Does this work the same on macOS and Windows?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "macOS ships the same BSD-compatible mkdir with -p support, so every command here works in the Terminal. On Windows, use WSL2 to get a real Linux environment, since the PowerShell equivalent is New-Item -ItemType Directory -Force and most genomic tools expect Unix-like systems."
      }
    },
    {
      "@type": "Question",
      "name": "How do I make a reusable project setup script?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Save the mkdir -p and brace-expansion commands in a bash script that takes the project name as its first argument, quote every variable, start the script with set -euo pipefail, and keep the script in a shared location or under version control so the whole lab creates identical skeletons."
      }
    }
  ]
}
</script>