How to delete and remove files on Ubuntu Linux

www.‮uttual‬ri.com
How to delete and remove files on Ubuntu Linux

To delete and remove files on Ubuntu Linux, you can use the rm command.

Here is an example of how to delete a file called file.txt:

rm file.txt

To delete a directory and all of its contents, you can use the rm command with the -r option to recursively delete the directory and its contents:

rm -r dir

Note that using the rm -r command can be dangerous, as it will delete all files and directories in the specified directory without prompting for confirmation. Make sure you are deleting the correct directory and that you have a backup of any important files before using this command.

Created Time:2017-10-28 21:39:02  Author:lautturi