O'Reilly logo

The Linux Command Line by William E. Shotts Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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]$ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required