5

I have searched a lot about that & the only way I found is to create a file named .hidden & put the file names I want to hide in separated by a break. This method seems to be not working for some reason even for 1 file.

Here I add the Exams.txt file as the one I want to hide

enter image description here

then press Ctrl+H and f5 & that's what I get, only .hidden file disappears.

enter image description here

So, any ideas? am I doing something wrong? Does this method requires something to be installed first that is not installed by default ? Or this is deprecated method that no longer works?

14
  • 4
    After doing this, did you remember press CTRL-H to actually hide all "hidden" files?
    – Enterprise
    May 14, 2018 at 23:01
  • 1
    The feature works fine for me. Did you refresh the folder after creating or modifying the .hidden file? Nautilus doesn't automatically pick up changes to the file.
    – muru
    May 15, 2018 at 4:42
  • 2
    @n0krashy I tested on Ubuntu 18.04. I simply created a .hidden file in the directory containing the files I wanted to hide, and put filenames, one per line, in the .hidden file.
    – muru
    May 15, 2018 at 14:09
  • 1
    As a one final attempt, could you try changing the name (select, press f2, completely delete all the characters, and type) of the file Exams.txtto something else and making change to the .hidden file accordingly?
    – pomsky
    May 16, 2018 at 6:58
  • 2
    And press return at least once after the file name in .hidden text, otherwise this one is really not reproducible, we have discussed that in chat and at least on my 18.04 it works like a charm.
    – Videonauth
    May 16, 2018 at 8:57

2 Answers 2

2

OK I have solved it guys thanks everybody.

It seems like my problem was HOW I create the .hidden file.

it doesn't work if I copied any file (instead of creating a new one) & renamed it to .hidden and delete it's content & put the files names I want to hide in it.

I used to copy a .txt file & do that & that was my problem apparently.

Seems like I MUST create a new file using the terminal

touch .hidden

command to work.

Sorry for the disturbance.

1
  • I'm not sure how the file is created changes things but I'm glad its finally working for you. May 18, 2018 at 13:51
0

When you name your files simply put a . in front of the name to make it hidden. For example:

ThisFileIsNotHidden
.ThisFileIsHidden

In Ubuntu 18.04 controlling display of hidden files is no longer in the preferences menu as it was in Ubuntu 16.04. It's been moved to a drop down menu on the top right corner of the window:

Nautilus 18.04 hidden files.gif

This setting is "persistent" and will the same setting across reboots.


Besides the default Nautilus method you can use a Python extension called "Nautilus Hide". You can install it using:

sudo apt install nautilus-hide

As OP stated it's not working out of Ubuntu Repositories so you install it the old-fashioned way:

$ git clone https://github.com/brunonova/nautilus-hide.git
$ mkdir build
$ cd build
$ cmake {path to nautilus-hide}
$ make
$ sudo make install

Verify installation

Use this command to verify it's installed:

$ ll //usr/share/nautilus-python/extensions/
total 32
drwxr-xr-x 2 root root 4096 May 15 04:47 ./
drwxr-xr-x 3 root root 4096 Feb 20 18:36 ../
-rw-r--r-- 1 root root 5165 Dec 28  2015 nautilus-admin.py
-rw-r--r-- 1 root root 5479 Apr  6 17:21 nautilus-admin.pyc
-rw-r--r-- 1 root root 5007 Oct 24  2015 nautilus-hide.py
7
  • 3
    That actually changes the filename potentially breaking something. The same works by adding the filename to a file named .hidden as TS claims not working (it does work on my system :) )
    – Rinzwind
    May 15, 2018 at 6:29
  • @WinEunuuchs2Unix I know that way already but this force me to change the name of the files I want to hide, which I don't want to do. I already mentioned in the subject of the question that I want to avoid that. so this doesn't answer the question. but thanks anyway.
    – n0krashy
    May 15, 2018 at 8:43
  • @Rinzwind are you on ubuntu 18 ? if you are, can you post a gif or pictures of how you did it ? with exact steps ? thanks in advance
    – n0krashy
    May 15, 2018 at 8:46
  • 1
    @n0krashy yes (but not now) and works perfectly on 18.04. In chat also confirmed by 2 other users ;)
    – Rinzwind
    May 15, 2018 at 14:00
  • @n0krashy I revised my answer so you can verify nautilus-hide is installed. Could you confirm it is? May 15, 2018 at 23:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .