Create Files and Directories


We will loosely follow the Software Carpentry Working with Files and Directories lesson from The Unix Shell

Let’s work through that lesson together…


We learned the following commands:

  • mkdir : make a directory

  • nano : a basic text editor

  • touch : update a file’s timestamp (and create an empty file if it does not exist)

  • mv : move a file or directory

  • cp : copy a file or directory

  • rm : remove a file (and/or directory if done recursively)

We also learned about wildcards:

  • * matches multiple (or 0) characters

  • ? matches a single character


try it…

From your home directory, create a directory / file structure that looks like:

├── code
├── data
│   ├── experiment-01.txt
│   ├── experiment-02.txt
│   └── experiment-03.txt
└── results