File Commands

In Chapters 7 through 11, you learn about many UNIX commands that work with files and directories. You can copy, move, delete, find, and print files, among other commands. Let’s take one file command as an example:

dtr> rm report1 report2 report3
dtr>

UNIX Has No Undelete Command

You must be careful when you remove files. If you mistakenly remove the wrong file, there is no way to bring it back. All you can do is restore the file from the last backup that you made.

In this example, the rm command removes or deletes the three filenames given. Most file commands will accept a list of files. Put a space, not a comma, between each filename.

No News Is Good News

In the previous rm example, notice that rm simply shows the shell prompt ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.