O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

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

rm

Removes a file (deletes a link)

rm [options] file-list

The rm utility removes hard and/or symbolic links to one or more files. When you remove the last hard link to a file, the file is deleted. Refer to Chapter 4 for more information about hard and symbolic links.

caution || Use Caution When You Use rm with Wildcards

Because you can remove a large number of files with a single command, use rm cautiously, especially when you are using an ambiguous file reference. If you are in doubt as to the effect of an rm command with an ambiguous file reference, first use echo with the same file reference to evaluate the list of files the reference generates.

Arguments

The file-list contains the list of files that rm deletes.

Options

--force

-f Without ...

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