如何在Bash中创建隐藏文件 [英] How to create a hidden file in Bash
问题描述
创建隐藏文件的bash命令是什么.我想将其命名为.httName
.
What is the bash command to create a hidden file. I want to name it .httName
.
我曾尝试对此进行谷歌搜索,但没有一个论坛建议对此进行任何解决.我只是在寻找命令来解决我的问题.如果有人碰巧知道答案,请帮帮我.
I have tried googling for this, but none of the forums suggest any work around for this. I am simply looking for the command to solve my issue. If anyone happen to know the answer please help me out.
推荐答案
默认情况下,以点开头的文件是隐藏的.您可以通过以下方式轻松创建它:
Files starting with a dot are by default hidden. You can create it simply by
touch .httName
任何人仍然可以使用
ls -a
如果要正确隐藏文件,则必须使用chmod更改文件夹权限.例如
If you want files to be properly hidden, you will have to change folder permissions using chmod. For example
chmod 770 folder_name
将阻止用户(所有者和组中的人除外)列出整个目录"folder_name".
will prevent users (except the owner and people in the group) from listing the whole directory "folder_name".
这篇关于如何在Bash中创建隐藏文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!