i want to be able to point access to a directory to other directories.
Like a link does, but I need it to access multiple target directories.
I`ve thought of a few ways of doing this, a kernel module`s the best.
I`ve done some C programming, but that level is beyond my abilities.
System calls can be used to intercept access to files and directories.
Again this is done with C only I believe, I`ve only seen C examples.
Is there a way of making Linux system calls using only Bash script?
I need to stop the directory access and run a script or C program.
It reads a file listing directories to search for the file being accessed.
If the file is found, it is accessed in place of the original file access.
How to intercept an access call to a given directory..?
Thanks amigo; Looking at them, they look to be access notices or loggers.
It doesn`t look like they trap the access and allow you to do something else.
Code sample for inotify:
Notice the comments "was" reference and the printf output is "past event" also.
I need to stop the access and run a script that does a "path" search for the file.
This is one method for making a "Multi-Link", a link that has multiple target directories.
A hard link points to files only.
A sym. link points to both files and directories.
A multi. link points to directories only.
It acts like PATH does, except it`s for directories that are not part of the PATH.
The union file system does the same thing also. except it`s complex over kill.
In reading about Linux kernel system calls, it looks like the way to do it.
But I don`t see how to do it except in C...
I really need a new type of link to be written into the kernel. " ln -m " = ( Multi-Link ).
It doesn`t look like they trap the access and allow you to do something else.
Code sample for inotify:
Code: Select all
/* File was accessed */
case IN_ACCESS:
printf("ACCESS EVENT OCCURRED: File \"%s\" on WD #%i\n",
I need to stop the access and run a script that does a "path" search for the file.
This is one method for making a "Multi-Link", a link that has multiple target directories.
A hard link points to files only.
A sym. link points to both files and directories.
A multi. link points to directories only.
It acts like PATH does, except it`s for directories that are not part of the PATH.
The union file system does the same thing also. except it`s complex over kill.
In reading about Linux kernel system calls, it looks like the way to do it.
But I don`t see how to do it except in C...
I really need a new type of link to be written into the kernel. " ln -m " = ( Multi-Link ).