python - linux怎么隐藏文件和目录
怪我咯
怪我咯 2017-04-17 17:45:24
0
6
423

linux怎么隐藏一个文件或者目录防止 ls -a 命令查看。

通过shell或者python可以做到吗? 怎么实现呢?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(6)
巴扎黑

By mounting, you can mount an empty file to the directory where you want to hide the file. After mounting, the files in that directory including hidden files cannot be listed through ls -a. As shown below, there is an empty folder a and the target hidden folder hide under temp. The system is [3.13.0-32-generic Ubuntu x86_64]

阿神

I want to say that if you can’t see it with ls -a, how do you know there is a file here? Save short movies to Linux, it’s awesome!

刘奇

You can make a separate partition and mount it to a directory. Don’t mount it when it’s not in use. Mount it manually when you feel the urge, and then uninstall it after you finish it.

刘奇

Set the permissions to 0700
root will not be subject to any restrictions

洪涛

Encryption is enough. Why do you have to hide it? ?

洪涛

Add "." in front of the name to hide it, but experienced drivers can still see it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!