【Delete Files and Documents in Linux】Step by Step Guide ▷ 2022

Deleting a Linux document is not complicatedbut you must do it very carefully, especially if you are a beginner, since essential system files could be deleted and create faults in the distribution you are using.

There are two ways to. On the one hand there are those that are not permanently deleted, they disappear from the user’s view and are saved somewhere else and, secondly, those that are permanently deleted using some specific tools.

Though how to delete linux documents may change a bit depending on the storage system, this time we want to share the steps to remove any file from your computer with installed and we will also tell you the reasons to remove from your computer the things that you no longer need and that only take up valuable space.

Learn step by step how to delete any file or document on your computer with the Linux operating system

To avoid accidentally deleting important files from your computer, it is key for the administrator to learn to use the commands, as well as knowing the functions and tasks that are carried out with each one of them.

Now, we are going to show you how to delete a single file, several at once or an entire folder:

delete a file

For delete single file that we no longer need on the computer, we will use the command “rm” (remove in English). However, we warn you that you must be sure that you want to delete the document since it does not ask you for any confirmation before executing the order.

See also  【Install Linux Fedora】Step by Step Guide ▷ 2022

To complete the task, follow these steps:

  • open the linux terminal.
  • Type this command: rm delete me.odt, the last word is the name of the file with its extension to delete.

Delete multiple files at once

To delete several elements at once, you must make a list with the names of each of the files and you are going to write them with a space in between as follows:

  • run the console command Linux.
  • Put this command for each file to delete: rm deleteme.odt
  • As you addit should look like this with the respective space between one and the other: rm eliminate me.odt eliminate me2.odt.

delete a folder

If you want to delete an entire folder with all the documents it contains, because you no longer need any of them, you are going to perform the following steps:

  • open terminal from linux.
  • uses this command: rm -r Files/*, this will delete all the documents inside, but not the directory.
  • In this case, put –r makes it possible for resources located inside the folder to be removed.
  • To delete only one type of files that are in the folder, you can use an asterisk followed by the extension. An example would be like this: rm *.doc.
  • And if you want to force the deletion of the filesregardless of any factor, use this command: rm -rf Dir1.

To complement the use of the “rm” command, we want to leave you some options that you can apply when deleting files:

  • -i: Ask if you are sure to delete.
  • –preserve-root: Keeps your default configuration regarding the root file.
  • -d: removes empty directories.
  • –help: A help message appears.
See also  【Turn On/Off the MOBILE with a Broken Button】Step by Step Guide ▷ 2022

Apart from the commandsyou have the possibility of delete the files through the native file manager .

The way to do it is as follows:

  • Open the manager and access the files that you want to delete
  • Hold down the left button of the mouse and see selecting the files you want to delete.
  • once selecteduse the right mouse button and there you will see the options to remove.
  • select one of the optionsWhat are they: “Remove”, “send to trash” either “delete files” and the deletion is ready.

Why is it important to delete unnecessary or unused files in Linux? Reasons to do it

Sometimes, we are not worried about doing maintenance or cleaning the computer and this it fills up with unnecessary applications or files that we never stop to look atBecause we just don’t need them.

However, this aspect must also be paid attention to and here we leave you several reasons to do so:

  • computer works better and it works faster, especially if the files were very large.
  • space is freed of the hard drive that you can use to store things that you really need.
  • We prevent errors from occurring in the operating system.
  • We increase file security preventing the system from crashing.
  • With more space available, the hardware installed in the computer will work with less effort, which will extend its useful life.

Finally, we indicate that It is recommended to frequently clean the temporary files folder in which remains of installed packages, dependencies, duplicate files or Internet browsing history can be stored. Doing this procedure will allow you to have a fast response computer.

Loading Facebook Comments ...
Loading Disqus Comments ...