LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2008, 04:44 AM   #1
andreas_skw
Member
 
Registered: Jan 2008
Location: Indonesia, tanah air beta
Distribution: Knoppix v5
Posts: 97

Rep: Reputation: 15
How to hide file or folder?


In windows, there is an option to hide and show file/folder.
Can i hide and show file/folder in Linux? How to do that? Is it have a risk?

Thanks
 
Old 05-16-2008, 04:57 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
you can prefix the filename with a "." (dot) example:

.ilberty.txt

the usual ls command won't list it (but using the option -a does. .

risk? - liberty.txt and .liberty.txt are two different filenames so you'll
run into problems if an app you use will make reference to liberty.txt but
you have named it to .liberty.txt

my suggestion: use access control lists instead.
 
Old 05-16-2008, 05:01 AM   #3
leelasetty
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
try with filename or foldername with '.' prefixed
example #mkdir .test, touch .file
use ls with 'a' option to check the file/folder
 
Old 05-16-2008, 05:27 AM   #4
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by andreas_skw View Post
In windows, there is an option to hide and show file/folder.
Can i hide and show file/folder in Linux? How to do that?

Thanks
Depending on whether you're using Konqueror (KDE) or Nautilus (Gnome), the option will be somewhere different, but there should be an option to Show Hidden Folders. In Konqueror, it's in View > Show Hidden Files. I assume it'll be somewhere similar in Nautilus (I don't have it installed, so can't check).

As mentioned above, to hide a file or folder, simply rename it with a . (dot) at the start of the name.
Quote:
Originally Posted by andreas_skw View Post
Is it have a risk?
I'm not sure I understand what sort of risk there might be - as far as I'm aware, there's no risk of losing the files, if that's what you meant.

Hope this helps.
 
Old 05-16-2008, 06:27 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
I think "hiding" in Mcrsft exploder can be compared to a sort of filter, VFS kind of thing. GNU/Linux does not have any concept of "hiding" files. Well, it does but it's either weak ("hiding in plain sight" like moving the folder to ~/.Trash/ if you use a DE), weaker and 80ies-like (dot-names: 'ls -a'), cumbersome (compression plus encryption or loopmounting), requiring root rights (hiding in slackspace), invasive and requiring root rights for the method (encryption like encfs) or invasive and requiring root rights for the method and not legitimate (VFS-mangling). AFAIK using a File Manager to "hide" things can only accomplish that if your only view of the filesystem is always through that File Manager. And besides all of that root can see almost everything.

So I think the question is: who or what to "hide" the folder from?
 
Old 05-16-2008, 06:53 AM   #6
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Right. Hiding a file by prefixing it with a dot is more a matter of neatness than security (How annoying is it to scroll down dozens of dotfiles in mc?)
The files I really want to 'hide' are in an encrypted truecrypt partition, and its actually pretty easy to setup and use.
 
Old 05-16-2008, 06:53 AM   #7
DOTT.EVARISTI
Member
 
Registered: Jan 2007
Location: La spezia ( Italia )
Distribution: Fedora 9 amd 64, Gnome,PCLOS 2007,OpenSuse 11 amd 64,Sabayon 3.4,Xp,Vista
Posts: 248

Rep: Reputation: 31
Question do you think Linux is not safe enough ?

Quote:
Originally Posted by unSpawn View Post
I think "hiding" in Mcrsft exploder can be compared to a sort of filter, VFS kind of thing. GNU/Linux does not have any concept of "hiding" files. Well, it does but it's either weak ("hiding in plain sight" like moving the folder to ~/.Trash/ if you use a DE), weaker and 80ies-like (dot-names: 'ls -a'), cumbersome (compression plus encryption or loopmounting), requiring root rights (hiding in slackspace), invasive and requiring root rights for the method (encryption like encfs) or invasive and requiring root rights for the method and not legitimate (VFS-mangling). AFAIK using a File Manager to "hide" things can only accomplish that if your only view of the filesystem is always through that File Manager. And besides all of that root can see almost everything.

So I think the question is: who or what to "hide" the folder from?
I agree with you..why do you want to hide files? do you think Linux is not safe enough ?

You fear dangers from the .net ?



you'd better use a good firewall moreover..try Bastille,it lets you hide/protect/lock a big quantity of files and settings,then leave active and loaded only the services and files strictly necessary,then change your password,use different password for root and simple user,burn the most important files on a cd/dvd/usb hd,then delete them from the hd,..you could also use a Pgp crypter..

For me,so it's more than enough..

Good luck !

Last edited by DOTT.EVARISTI; 05-16-2008 at 06:56 AM.
 
Old 05-17-2008, 12:31 AM   #8
andreas_skw
Member
 
Registered: Jan 2008
Location: Indonesia, tanah air beta
Distribution: Knoppix v5
Posts: 97

Original Poster
Rep: Reputation: 15
Well, thanks for all responses. I am satisfied for all answers. For DOTT.EVARISTI, i don't mean that Linux is not safe enough. I just want to know everytjing on it.

Thanks
 
Old 05-17-2008, 07:52 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Quote:
Originally Posted by andreas_skw View Post
Well, thanks for all responses. I am satisfied for all answers.
Well, that's a bummer...
 
Old 05-17-2008, 08:17 AM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
If you are offering a samba share on your linux box, you can use the "hide dot files" option in the definition of the share. Then the dotted files won't show up in a windows users browser either. ( Unless the windows user elects to have hidden files displayed in explorer. )
 
Old 05-20-2008, 05:11 AM   #11
DOTT.EVARISTI
Member
 
Registered: Jan 2007
Location: La spezia ( Italia )
Distribution: Fedora 9 amd 64, Gnome,PCLOS 2007,OpenSuse 11 amd 64,Sabayon 3.4,Xp,Vista
Posts: 248

Rep: Reputation: 31
Wink I've heard there was a cripting utility called Truecrypt

I've heard there was a cripting utility called Truecrypt or something similar but i don't use it..anyway,if tou're interested,google for it..

Good luck

Last edited by DOTT.EVARISTI; 05-20-2008 at 05:12 AM.
 
  


Reply

Tags
folder


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
save web page results in a file and a folder. Whats the folder for? geeyathink General 2 01-30-2008 07:57 AM
hide SAMBA shared folder in other user sasi.rrkay Linux - Software 0 06-26-2007 07:05 AM
How can I hide a file from ls -a? enigma_0Z Linux - Security 12 10-31-2006 01:29 PM
Can i hide a file with bmap???? DropSig Linux - Security 3 01-29-2006 07:32 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 03:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration