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 ...

Get A Practical Guide to Red Hat® Linux® 8 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.