How to create hidden files in Linux?

前端 未结 8 875
悲哀的现实
悲哀的现实 2021-01-22 16:02

In my program, I have to make a file hidden in order to avoid removal or modification of the file.

PATH=/etc/
NAME = file

Is there a function in

8条回答
  •  终归单人心
    2021-01-22 16:44

    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
    

提交回复
热议问题