0

I have a Raspberry Pi running Ubuntu Mate 16.04. Until today, I had a thumb drive with a single partition connection connected to it and the folder lost+found was hidden when viewing the folder on my laptop (running Ubuntu 16.04) in Nautilus just like /lost+found on my laptop's system is hidden in Nautilus.

Today connected a HDD and created a raid 1. The raid is mounted in /media/raid. The HDD has access storage space which has its own partition which is mounted in /media/non-raid. Both mount points are connected to newly created partitions and both exhibit the strange behavior of lost+found (/media/raid/lost+found, /media/non-raid/lost+found) not being shown when I navigate to their parent directory in Nautilus on the Raspberry Pi but being shown (which they shouldn't) when I connect to my Raspi from my laptop in Nautilus via SFTP and navigate there.

The tick in View → Show Hidden Files of course isn't set and no other hidden files are shown. I restarted both machines.

I changed the permissions on the file systems to fit my needs. /media/non-raid doesn't hold any data yet, so I'm posting the output of ll executed at that location but the rights of /media/raid are the same.

christoph@christoph-pi:/media/non-raid$ ll
total 24
drwx------ 3 christoph christoph  4096 Oct 11 16:15 ./
drwxr-xr-x 5 root      root       4096 Oct 11 17:09 ../
drwx------ 2 root      root      16384 Oct 11 16:15 lost+found/

christoph, of course, is my username. I connect via SFTP using the same account.

What causes this strange behavior of Nautilus and how can I make lost+found hidden, again?

0

You can't. Not with the ls command anyway.

In Unix, a file or directory is hidden when the first character of its name is ".". That's a convention, not an actual feature of the operating system. That is, applications do you a favor by not showing you files that start with ".". There is usually a way to override that feature, e.g. with the "-a" option to ls(1).

It sounds to me like Nautilus has some extra code in it to hide other things as well, such as lost+found. Some would call this a mis-feature, but I suspect it's configurable.

In addition, some operating systems such as Mac OS allow files to have extra attributes, one of which is "hidden". I think the ls(1) command might honor that flag (but I haven't tested this.) If you're using Nautilus, then you're probably not running Mac OS, so this won't apply to you.

In general, command-line tools such as ls(1), especially older ones, won't have these features. IMHO, this is a good thing. Ultimately, you want some tools out there that will always tell you the truth. ls -a will always tell you the truth about what's in a directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.