Creating, copying, moving, renaming, and removing files

This section sounds like a mouthful. Not to worry; it covers the techniques for creating and removing files. It also covers the methods for copying and renaming files.

There are various files that we use on a daily basis. We can do an ls on the /home/philip/Documents/NewTest directory, as follows:

philip@localhost Documents]$ cd NewTest/[philip@localhost NewTest]$ ll -atotal 8drwxrwxr-x. 2 philip philip 4096 Aug  6 12:04 .drwxr-xr-x. 3 philip philip 4096 Aug  6 13:45 ..[philip@localhost NewTest]$

Currently, they aren't any files inside of this directory. In Linux, we can create a file from the shell; we can use the touch command to accomplish this:

[philip@localhost NewTest]$ touch OurFile ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

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