Eliminar archivo de Linux: así es como

Delete Linux file: here’s how

Delete Linux file: here's how

monitor

Of course, you can not only create files with common Linux distributions, but also delete them again. As in Windows, there is the option to use the file manager or the command line.

Delete files in file manager

1st step:

Select files to delete with pressed the left mouse button outside.

×

2nd step:

Call with one Right click on one of the files the context menu. Select the entry “Move to trash“. Alternatively, you can use the [Entf]-Press the button. If you are using a Linux distribution other than Ubuntu, the entry in the context menu may have a different name, such as “delete files“or”Remove“, Have.

×

Delete files using the console command

1st step

Right click to open a new terminal. If your Linux distribution does not offer such an entry, you must open the console manually and navigate to the desired path.

×

2nd step

The command rm (short for remove) deletes the files specified by you. For example, if you want to delete multiple files, enter the following in your terminal:rm filename1 filename2 filename3

×

Delete folders using the console command

1st step:

Open your terminal manually or via the context menu.

×

2nd step

If you haven’t already done so, navigate to the folder that contains the files you want to delete and press rm -r folder name delete the folder. the -r means recursive. This means that not only the folder will be deleted, but also all the files it contains.

×

More examples of the rm command

Here we show you some examples of rm I send. Before doing this, make sure you are in the correct directory with the terminal so you don’t accidentally delete bad files.

  • To delete a single file, use rm file name
  • You can delete multiple files with rm fileName1 fileName2 fileName3
  • Use for folders rm -r OrderName
  • You can also insert placeholders. So you can rm * .txt all files with the extension .TXT delete in current directory.
  • With man rm help page rm In the terminal.