O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

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

Removing Files with the rm Command

If you used the touch command and now have a file that you do not want on your Unix system, you may want to get rid of it. In this next section, we will learn how to remove files from your Unix system.

The rm command is used to delete unwanted files on your Unix system. Remember that using this command can get you into some trouble if you don't use it properly—you could remove data from your system that you do not want to remove. Unix takes what you say very literally, so be careful—you are not in a Microsoft Windows environment that checks you every step of the way when you delete a file. If you want to remove a file from your Unix system, follow these steps to use the rm command:

1.
Determine which file, ...

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