如何在Linux中创建隐藏文件? [英] How to create hidden files in Linux?

查看:317
本文介绍了如何在Linux中创建隐藏文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的程序中,我必须创建一个隐藏文件,以避免删除或修改文件.

In my program I have to create a hidden file in order to avoid remove or modification of file.

PATH=/etc/
NAME = file

c中是否有允许这样做的功能?

Is there is function in c which allow to do that ?

谢谢.

推荐答案

您可以在文件名的前面添加..话虽如此,如果您的目标是不允许修改文件,请将权限更改为无法修改的权限.像这样:

You can just add a . to the front of the file name. Having said that if your goal is to not allow modification of the file change the permissions to something that can't be modified. Something like:

chmod 444 fileName

这篇关于如何在Linux中创建隐藏文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆