Deleting Files and Directories

To delete a file or a directory when in Konqueror, highlight the icon and right-click. Select eitherMove to Trash or Delete. Move to trash is the safer option because the file can be retrieved from the trash can so long as the trash hasn't been emptied. Files that are deleted are not retrievable.

Konqueror also allows you to delete a file or directory by using your mouse to drag it into the trash can on your desktop.

To delete a file from the command line, type:

rm filename
				

You can use wildcards (e.g., ch* or ch?) to delete more than one file at a time. Be very cautious when using wildcards. Linux allows you to issue a command like the following:

rm *

It deletes all the files in the current directory. It's ...

Get Spring Into Linux® 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.