Hiding files in unix/linux | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Hiding files in unix/linux

UNIX for Advanced & Expert Users


Tags
linux, linux commands

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-27-2005
victorvvk victorvvk is offline
Registered User
 
Join Date: Mar 2005
Last Activity: 27 March 2014, 2:40 AM EDT
Location: Hyderabad, india
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Hiding files in unix/linux

Can Anybody please help me with the command in Unix/Linux which can help me hide the files which is equal to ATTRIB in DOS

Not using . , but any commands in unix which will do this
if you any script which will do this ,it will be very helpful
Its very URGENT


Regards

Victor
Sponsored Links
    #2  
Old 04-27-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
Victor,

Please read the forum rules. Duplicate and cross-posting is NOT permitted.

I have removed your two duplicate posts.

Thanks,
ZB
Sponsored Links
    #3  
Old 04-27-2005
victorvvk victorvvk is offline
Registered User
 
Join Date: Mar 2005
Last Activity: 27 March 2014, 2:40 AM EDT
Location: Hyderabad, india
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
I am really sorry for that but i need it very urgently


regards

Victor
    #4  
Old 04-27-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
 
Join Date: Mar 2005
Last Activity: 20 September 2013, 10:59 AM EDT
Location: Philadelphia metro
Posts: 958
Thanks: 3
Thanked 66 Times in 59 Posts
see ... How to make a file Hidden
Sponsored Links
    #5  
Old 04-27-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 29 July 2014, 6:05 PM EDT
Location: Ashburn, Virginia
Posts: 9,896
Thanks: 58
Thanked 415 Times in 249 Posts
There is no general way to hide files in unix/linux in the dos sense. But....

1. You can put files in a directory and then "chmod 700 directory". Now only the owner of the directory can see the files. This is the closest thing to a correct answer to the question.

2. If the file name starts with a dot, it is treated specially by the shells and by ls. This is enough to hide files from people who prefer to not see them.

3. Extending on number two, some people try screwball names. Inexperienced users often don't understand how to deal with such files. Names I have seen include naming a file a control character, ".. ", " ", etc.

4. You can put files in a directory and then mount another filesystem on the directory. At this point special tricks are needed to see the files and only root will have the power to employ the tricks.

5. A program can open a file and then unlink it. If that was the only link to the file, the file now has zero names. But it won't be deleted until the last program closes the file. Such a file can be called hidden. This happens a lot. A file system fills and someone finds an offending file. They rm it. Then they wonder why the space wasn't freed. I must see this once a week or so.

And there are few more ways that involve intentional damage to a filesystem.
Sponsored Links
    #6  
Old 04-28-2005
victorvvk victorvvk is offline
Registered User
 
Join Date: Mar 2005
Last Activity: 27 March 2014, 2:40 AM EDT
Location: Hyderabad, india
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you Sir,

I got the right answer, I was not clear when i stated my requirements earlier . The main reason of asking that question is because , i was given a task by my boss about hiding a files in unix only for a particular user but other users should be able to read/write to that file.

by begining a dot in the filename hides in the unix environment , but when i see the same in WinCVs (which is a client in windows) everybody is able to see the files along with the .(dot).

Is there any solution

But your answer was somewhat of help. Keep up the good work

Thanks and Regards

victor
Sponsored Links
    #7  
Old 04-28-2005
chuckuykendall chuckuykendall is offline
Registered User
 
Join Date: Apr 2005
Last Activity: 18 July 2014, 12:45 PM EDT
Location: McKinney, TX
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Perhaps you can use UNIX ACL's (Access Control List). I'm not sure if it's in any UNIX other than AIX or HP-UX, but others on this board may be able to help there. I normally wouldn't use ACL's, but for such a situation (where you want to hide files, or deny read access to files, for one user) it may be a good solution. ACL's are exception-bases permissions on files and directories that pre-empt normal permissions. On AIX, you can do a man on the commands acledit, aclget, and aclput. On HP-UX, you can do a man on the commands chacl, getacl, lsacl, and setacl.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Management application user rights on the files in a Unix / Linux alex90 Shell Programming and Scripting 1 04-04-2012 02:05 PM
Stress testing php files at Unix/Linux Command line Malleswari Shell Programming and Scripting 5 08-24-2010 04:24 PM
Uploading files from Mac to Unix/Linux via ssh libertyforall UNIX for Dummies Questions & Answers 3 04-13-2010 08:01 PM
Regarding migration (from Tru64 Unix to Linux 3.0) of Files :- oraboot and orabackup marconi Shell Programming and Scripting 1 07-25-2008 03:20 PM
I/ps pls for migration of oraboot & orabackup files from Tru64 Unix to Linux 3.0 marconi Shell Programming and Scripting 1 07-25-2008 02:35 PM



All times are GMT -4. The time now is 03:01 AM.