stack_A stack_A - 10 months ago 45
Linux Question

how to create hidden files in linux

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

NAME = file

so I ask if 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