You are not logged in.

#1 2009-07-02 03:12:28

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Using a .hidden file to hide folders

I'd like to use a .hidden file to hide all the windows system files on my ntfs drives but it doesnt seem to be working. I'm using kdemod 3.5 if that matters. Heres the contents of my file:

$RECYCLE.BIN
Diskeeper
RECYCLER
"System Volume Information"
desktop.ini
"HD Movies.lnk"
Movies.lnk

and heres the listing of that directory:
$RECYCLE.BIN  .  ..  .hidden  Diskeeper  HD Movies.lnk  Movies.lnk  RECYCLER  System Volume Information  TV  desktop.ini

Offline

#2 2009-07-02 03:22:46

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Using a .hidden file to hide folders

I'm pretty sure that ntfs does not support hidding of files using unix dot file naming.

Offline

#3 2009-07-02 06:38:16

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: Using a .hidden file to hide folders

If it's on a separate hard-drive or possible a partition, could you not mount it to a directory that is set to hidden?


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#4 2009-07-02 12:48:38

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Using a .hidden file to hide folders

linux does not (AFAIK) attach any special meaning to a file called '.hidden' - it's just another dot-file ...

Offline

#5 2009-07-02 12:56:55

jrib
Member
Registered: 2007-11-05
Posts: 15
Website

Re: Using a .hidden file to hide folders

perbh wrote:

linux does not (AFAIK) attach any special meaning to a file called '.hidden' - it's just another dot-file ...

In nautilus (and probably other file browsers), it checks the contents and hides the files listed.

Offline

#6 2009-07-02 15:17:49

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Using a .hidden file to hide folders

*chuckles* oh ok - I _never_ use a file browser, cli has always been sufficient ...

[edit]
So - when the OP listed his content, he probably used 'ls' and not a browser!
And how does a filebrowser treat a  '$' ?? As part of filename or does it try for an env-variable?
[/edit]

Last edited by perbh (2009-07-02 15:22:27)

Offline

#7 2009-07-02 15:43:31

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Using a .hidden file to hide folders

you are correct, I did an ls -a to show the contents of the directory. the .hidden file was hidden when I unchecked "show hidden files" but thats all that was hidden.

iBertus wrote:

I'm pretty sure that ntfs does not support hidding of files using unix dot file naming.

It definitely does, I attached . to a folder on an ntfs partition and it hid the folder.

XFire wrote:

If it's on a separate hard-drive or possible a partition, could you not mount it to a directory that is set to hidden?

Thats how I have it set up, but I want to keep one folder called TV visable, but the rest hidden. Also I dont want to change the filenames because then that would screw up windows.

Last edited by brando56894 (2009-07-02 15:45:00)

Offline

#8 2009-07-02 16:10:36

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Using a .hidden file to hide folders

@brando56894:
>>you are correct, I did an ls -a to show the contents of the directory. the .hidden file was hidden when I unchecked "show hidden files" but thats all that was hidden.

So what that tells me is that the filebrowser you are using _only_ hides dot-files and '.hidden' has no special meaning.
Which - in my humble opinion - is the way it should be ... anything else is windowism (for better or worse).

Offline

#9 2009-07-02 16:17:11

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Using a .hidden file to hide folders

IIRC I used to do it in ubuntu somehow along with kde 3.5, it was a safety precaution that hid everything in / besides /home so new users wouldnt accidentally delete stuff. i know it was the same concept as this but im not sure if the filename is correct. I found it after a 5 minute search on google so the filename could be wrong.

Offline

#10 2009-07-02 16:19:50

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: Using a .hidden file to hide folders

brando56894 wrote:

you are correct, I did an ls -a to show the contents of the directory. the .hidden file was hidden when I unchecked "show hidden files" but thats all that was hidden.

iBertus wrote:

I'm pretty sure that ntfs does not support hidding of files using unix dot file naming.

It definitely does, I attached . to a folder on an ntfs partition and it hid the folder.

XFire wrote:

If it's on a separate hard-drive or possible a partition, could you not mount it to a directory that is set to hidden?

Thats how I have it set up, but I want to keep one folder called TV visable, but the rest hidden. Also I dont want to change the filenames because then that would screw up windows.

Create a sym-link outside of the windows folder and place it in a more convenient place, and have the root folder hidden. That way you just navigate to it through the link, but the rest of the windows bit won't be shown.

Hope that is clear enough.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#11 2009-07-02 17:01:06

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Using a .hidden file to hide folders

I actually have that done too, the true path of it is /media/media/TV but I have it symlinked to /home/bran/TV. I'm just anal about this kind of stuff lol and wanted to do it to other folders that I dont have symlinked.

Offline

#12 2009-08-03 23:43:28

gladstone
Member
Registered: 2009-01-03
Posts: 74

Re: Using a .hidden file to hide folders

This is something I've also wanted to do. Unfortunately, .hidden files aren't supported by Thunar.

Another way of achieving this could be something like:

alias ls='ls --color=auto $( if [ -f .hidden ]; then cat .hidden | xargs -I {} echo -n --hide="{}"\ ; fi; )'

by fflarex from the Post your handy self made command line utilities thread. Although as the author says, it only works in the current folder.

Last edited by gladstone (2009-08-03 23:53:17)

Offline

Board footer

Powered by FluxBB