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

Victor,

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

I have removed your two duplicate posts.

Thanks,
ZB

I am really sorry for that but i need it very urgently

regards

Victor

see ... How to make a file Hidden

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.

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

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.

Thank you Chuck

I got it very very close

I am on way on trying this command

Regards

Victor

I am sorry it didnt work

can anyone please help

The best answer I can give you is to put that user in a group of his own. OR if you need to keep that group membership intact, make a new group and add everyone else to it except this person. Group management is the best answer I can give.