Copying, Moving, and Deleting Files and Directories

Creating files and directories is only part of the story. In the GUI, you’ll drag files and directories to move them to new locations, and you’ll use the mouse to copy files from one place to another. And sometimes you’ll want to get rid of a file or an entire directory’s worth of files. You can do all of these from the CLI more quickly than you can with the GUI.

In the previous section, you created a directory structure that looks like this:

 ├── code
 │   ├── elm
 │   ├── go
 │   └── js
 ├── docs
 │   ├── diagrams
 │   └── markdown
 ├── movies
 ├── music
 └── photos

Let’s create a few files in there. First, create some empty files in each subdirectory of the code directory. Use brace ...

Get Small, Sharp Software Tools now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.