O'Reilly logo

LPIC-1/CompTIA Linux+™ Certification All-in-One Exam Guide by Robb Tracy

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

Managing Files from the Command Line

In addition to managing directories in the file system, there will be many occasions when you need to manage the files they contain. In this part of the chapter, you will learn how to complete the following tasks:

• Creating files

• Viewing file contents

• Deleting files

• Copying and moving files

• Determining the file type

Let’s first look at how to create new files in your file system.

Creating New Files

From time to time, you will need to create new files in your Linux file system. Creating one can be accomplished using the touch command from the shell prompt. To use touch, enter touch followed by the name of the file you want to create. In the next example, the command touch myfile.txt was issued from ...

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