I want to delete a file or folder by implementing my own system call such that after giving command 'ls -a' it must not be visible to me.
So basically I want to hide a file from commands like 'ls'or 'ls -a'. And then unhide it from the same.
It means I don't want it to completely delete it. Just hide it from user.
I am thinking it has to do some thing with
struct file_operations *f_op;
From where we can actually hide the file by manipulating 'readdir()'.
But I don't know how to manipulate it.
Any help?
P.S:- Linux Kernel version 3.5.x x86 64bit. I am doing changes in /linux/fs/namei.c