0
A hidden file in a linux environment has a point (.) before its name, so that for example: .arquivo.c
is hidden and arquivo.c
isn’t. Knowing that, my question is, how to hide a number of files programmatically? And if I can go further, how to hide files only from a certain extension?
I’m aware of two possibilities so far:
- Renaming them, one by one.
- Using a file
.hidden
¹.
However the first option seems to me unfeasible and the second, despite being exactly what I’m looking for, was not effective in the environment where I work, of a Raspberry. There is another option?
¹A . Hidden is used to determine what will be hidden in a given directory.
Was not effective in what sense?
– Wanderson Rodrigo
It didn’t work. I created a file. Hidden, listed some files to hide and nothing happened.
– Caio de Paula Silva
Why would the first option be unfeasible?
– nullptr
@because there is some method capable of doing what I am looking for more efficiently. Hidden, if it served me, would already solve a lot.
– Caio de Paula Silva
@Caiodepaulasilva Sorry, could edit your question by also putting the code or the method you did to try to hide?
– Wanderson Rodrigo
the method using the . Hidden file only works with the Nautilus file manager of the Gnome environment, as far as I know...in the terminal does not work
– zentrunix
@zentrunix came to similar conclusion. I kept the question open in the hope of there being a solution that I do not know.
– Caio de Paula Silva