Contents
How do I use rm in Linux?
How to Remove Files
- To delete a single file, use the rm or unlink command followed by the file name: unlink filename rm filename. …
- To delete multiple files at once, use the rm command followed by the file names separated by space. …
- Use the rm with the -i option to confirm each file before deleting it: rm -i filename(s)
How do I use rm in terminal?
To delete a specific file, you can use the command rm followed by the name of the file you want to delete (e.g. rm filename ). For example, you can delete the addresses. txt file under the home directory.