Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-07-01 09:25:16

Lucidae
Member
From: Australia
Registered: 2023-06-25
Posts: 7

[SOLVED] Does Thunar respect the .hidden file?

The special .hidden text file in a user's home directory allows certain file managers to hide folders that cannot be renamed. For example:

echo snap >> ~/.hidden

It's not clear to me if Thunar ever supported this, but from my testing it doesn't seem to do anything.

Last edited by Lucidae (2023-07-05 05:43:36)

Offline

#2 2023-07-03 08:57:39

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: [SOLVED] Does Thunar respect the .hidden file?

I share something that you may find interesting below but the solution to your problem is to simply uncheck the Show Hidden Files option, or press Ctrl+H.

Dot files are not related to file managers (modern ones anyway). They came to be as a consequence of a historical "bug", which was really an oversight in the implementation of the `ls` utility. Now, it's specified and defined by POSIX:

The special filename dot shall refer to the directory specified by its predecessor.

`ls` was supposed to ignore only .. and ., parent and current directory, respectively. However, earlier implementations did not adhere to this strict convention and were not careful. They only checked the first character and if it was a period, the file was skipped. That's how "hidden" files became a thing. By the time people realized, it was already too late to fix the bug, so everyone agreed to accept it as a feature.

For further reading http://xahlee.info/UnixResource_dir/wri … ename.html

Last edited by KBar (2023-07-03 09:02:14)


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#3 2023-07-05 03:18:11

Lucidae
Member
From: Australia
Registered: 2023-06-25
Posts: 7

Re: [SOLVED] Does Thunar respect the .hidden file?

KBar wrote:

I share something that you may find interesting below but the solution to your problem is to simply uncheck the Show Hidden Files option, or press Ctrl+H.

Dot files are not related to file managers (modern ones anyway). They came to be as a consequence of a historical "bug", which was really an oversight in the implementation of the `ls` utility. Now, it's specified and defined by POSIX:

The special filename dot shall refer to the directory specified by its predecessor.

`ls` was supposed to ignore only .. and ., parent and current directory, respectively. However, earlier implementations did not adhere to this strict convention and were not careful. They only checked the first character and if it was a period, the file was skipped. That's how "hidden" files became a thing. By the time people realized, it was already too late to fix the bug, so everyone agreed to accept it as a feature.

For further reading http://xahlee.info/UnixResource_dir/wri … ename.html

That's some interesting history - thanks for sharing, KBar.

To clarify, this is what I was referring to;

In Linux, and other UNIX-like systems, a file with a name that starts by a dot ('.') is considered a hidden file. Some file managers also hide files that end with a tilde ('~'), which are considered backup files.

To hide an existing file, you would have to rename it. That's not always feasible or desirable.

Some file managers, like Caja, offer an alternative way of hiding files: you create a text file that lists, line-by-line, the names of all the files you want to hide in a particular folder (directory) and save it in that folder with the name .hidden. The next time you open or refresh that folder, those files will not be visible.

https://github.com/Fred-Barclay/Caja-Hide

Last edited by Lucidae (2023-07-05 03:58:40)

Offline

#4 2023-07-05 04:36:36

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: [SOLVED] Does Thunar respect the .hidden file?

Thanks for clarification. I've never known (as you clearly see) of such a feature before. However, after testing it on Thunar 4.16.10, I can confirm that it is supported. Which version of Thunar did you try it on?


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#5 2023-07-05 05:42:00

Lucidae
Member
From: Australia
Registered: 2023-06-25
Posts: 7

Re: [SOLVED] Does Thunar respect the .hidden file?

KBar wrote:

Thanks for clarification. I've never known (as you clearly see) of such a feature before. However, after testing it on Thunar 4.16.10, I can confirm that it is supported. Which version of Thunar did you try it on?

I am on version 4.18.4.
Actually I stumbled upon the solution, it seems a relative path is required (eg. snap) rather than an absolute path (eg. /home/user/snap).

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 540.61 KiB (Peak: 541.89 KiB) ]