Hiding files in unix/linux


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Hiding files in unix/linux
# 1  
Old 04-27-2005
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
# 2  
Old 04-27-2005
Victor,

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

I have removed your two duplicate posts.

Thanks,
ZB
# 3  
Old 04-27-2005
I am really sorry for that but i need it very urgently


regards

Victor
# 4  
Old 04-27-2005
# 5  
Old 04-27-2005
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.
# 6  
Old 04-28-2005
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
# 7  
Old 04-28-2005
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Hiding commnd line arguments in ps command on Linux

Hi Unix lovers, I am trying to seek an explanation for a simple looking code - why it works? I found below program which hide command line argument in ps command. #include <string.h> int main(int argc, char **argv) { // process command line arguments.... // hide command... (4 Replies)
Discussion started by: shriashishpatil
4 Replies

2. Shell Programming and Scripting

Password hiding in UNIX

Hi guys, I use STTY command to make the password invisible. Now I need to write the password into another file pwd.txt, but in an invisible manner, something like ******. Another thing is to when I echo the content of pwd.txt I get the password I actually typed. Thanks guys. Help me out. (5 Replies)
Discussion started by: mohanalakshmi
5 Replies

3. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

4. Shell Programming and Scripting

Management application user rights on the files in a Unix / Linux

good evening .. I have a plea, who I can help me with a management application user rights on the files in a Unix / Linux I need for college .. .. and not told us no clue .. thank you (1 Reply)
Discussion started by: alex90
1 Replies

5. Shell Programming and Scripting

Convert directory of text files to Unix/Linux Line Ending

I need help converting a directory of *.txt with Windows line ending to UTF-8 character encoding and Unix/Linux line ending. (9 Replies)
Discussion started by: chipperuga
9 Replies

6. Shell Programming and Scripting

Stress testing php files at Unix/Linux Command line

Hi, Your great help is very appreciated. I am looking for any Unix command or tool for doing Stress/Load test of php files at command prompt. I tried torture.pl but it is not working after20 concurrent threads/users. as it is very urgent for me..please suggest ur ideas asap. thanks (5 Replies)
Discussion started by: Malleswari
5 Replies

7. UNIX for Dummies Questions & Answers

Uploading files from Mac to Unix/Linux via ssh

Ok. I am using the Terminal window to ssh into a unix server. I am not sure how to copy a file from my mac onto the unix server. What command do I enter and how do I type the file I want to upload Example. Say my file is named Test1.doc and it is on the usr/me/test/working/ directory and I want... (3 Replies)
Discussion started by: libertyforall
3 Replies

8. Shell Programming and Scripting

Regarding migration (from Tru64 Unix to Linux 3.0) of Files :- oraboot and orabackup

Hi, I have 2 Files - oraboot and orabackup, which are correct Files in Tru64 Environment and I am trying to check whether the Files are running properly in my current Linux 3.0. (basically trying to migrate them from Tru64 to Linux 3.0). The files are neither Shell nor Perl, and just have the... (1 Reply)
Discussion started by: marconi
1 Replies

9. Linux

I/ps pls for migration of oraboot & orabackup files from Tru64 Unix to Linux 3.0

Hi, I have 2 Files - oraboot and orabackup, which are correct Files in Tru64 Environment and I am trying to check whether the Files are running properly in my current Linux 3.0. (basically trying to migrate them from Tru64 to Linux 3.0). The files are neither Shell nor Perl, and just have the... (2 Replies)
Discussion started by: marconi
2 Replies

10. Shell Programming and Scripting

I/ps pls for migration of oraboot & orabackup files from Tru64 Unix to Linux 3.0

Hi, I have 2 Files - oraboot and orabackup, which are correct Files in Tru64 Environment and I am trying to check whether the Files are running properly in my current Linux 3.0. (basically trying to migrate them from Tru64 to Linux 3.0). The files are neither Shell nor Perl, and just have the... (1 Reply)
Discussion started by: marconi
1 Replies
Login or Register to Ask a Question