You are previewing The Linux Command Line.

The Linux Command Line

Cover of The Linux Command Line by William E. Shotts Jr. Published by No Starch Press

Let’s Build a Playground

Since we are going to do some real file manipulation, let’s build a safe place to “play” with our file manipulation commands. First we need a directory to work in. We’ll create one in our home directory and call it playground.

Creating Directories

The mkdir command is used to create a directory. To create our playground directory, we will first make sure we are in our home directory and then create the new directory:

[me@linuxbox ˜]$ cd
[me@linuxbox ˜]$ mkdir playground

To make playground a little more interesting, let’s create a couple of directories inside it called dir1 and dir2. To do this, we will change our current working directory to playground and execute another mkdir:

[me@linuxbox ˜]$ cd playground [me@linuxbox playground]$ ...

The best content for your career. Discover unlimited learning on demand for around $1/day.