HOME > Linux > Linux: Delete File - How To Get Rid Of The Contents

Linux: delete file - how to get rid of the contents

Linux refers to all operating systems based on the Linux kernel and essentially the GNU software. Regardless of which distribution you have chosen, a similar range of functions is available to you. If you want to delete a file, then this is possible in a few steps.

How to delete a file in Linux

If you want to delete a file in a Linux distribution, you have different options, as with other operating systems. So you have the choice between using the command line or deleting via the file manager.
  1. To delete a file via the file manager, select all files you want to delete. This is only necessary if there are multiple files.
  2. Then right-click on the selected files to open a context menu.
  3. Select the option "Move to trash" here. In some distributions, the corresponding option is also called "Delete files" or "Remove". In addition, you can press the "Del" key.
  4. If, on the other hand, you want to delete the files using the console, you need the appropriate command.
  5. Open a new terminal window via the icon or the right mouse button. For some distributions, it is necessary to open the console in another way.
  6. Write the command "rm" and then the names of the files separated by a space. Confirm the input with the "Enter" key. If it is a folder, write "rm -r" and then the name of the folder.

By Teplitz

What is hacktivism? We explain it - with examples :: Monster Hunter World: Find ivy - in these places it works
USEFUL LINKS