Hide files in Linux ... but in a slightly different way

hide Linux files

You will already know that hide files and directories in GNU / Linux and other * nix it is very easy to simply put a period in front of its name. For example, to hide a supposed directory called Data, it would be enough to rename it as .Data. This would remain hidden from view in both the file manager and the console.

Evidently it is not a security method, since you can press Ctrl + H to make them show or stop showing in the file manager, as well as use options like -a for the ls command. But it can be a good solution in other cases ... For example, to hide certain files or directories that some programs leave in certain locations and that you cannot delete or move to another place. This way you will get a cleaner view and you can focus only on those files you want to see.

Regardless of the use that you are going to give it, you should know that there is another method that may be more practical and faster when you need to hide several files or directories at once. This method will save you going one by one by renaming them with the dot in front. Also, if you don't get along very well with the console, don't worry, because you can do it in graphical mode.

Hide files easily

Well, the procedure is as extremely simple as follow these steps:

  • Go to directory where are the files or directories you want to hide.
  • Create a text file called .hidden.
  • Now with your favorite text editor, write inside it an entry (one for each line) of the files and directories that you want to be hidden. For example, imagine you want to hide the directories Templates, Public, Templates, and a file called test.txt. Then the content of the text file would be:
Plantillas

Public

Templates

prueba.txt

  • Guarda what you have written and ready.
  • Close the file manager window and when you open it again you will see that they are hidden ... and without it. in front of. (as long as you do not have the view activated so that the hidden ones are seen, remember Ctrl + H)

Esto works on all major file managers (Nautilus, Dolphin, Thunar, Caja, Pcmanfm-Qt), although it may not be so in some.

Reverse the process

If you would like to that they reappear, you can select one of these two options:

  • If you only want some of the ones you hid to show: just edit .hidden with your favorite editor and delete the name of the one you want to appear.
  • If you want everyone you hid to show up: removes the .hidden.
  • If you want them to appear momentarily (and are not affected when you use Ctrl + H): you can rename .hidden and when you want it to be hidden again, revert to its original name. There would be even other ways, like renaming the names inside, etc., but this is the fastest ...

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.