Quote Originally Posted by dinosoep View Post
What I wanted to do was check for every file in the ramdisk if a process was using it and if not copy it to the knoppix-data, remove from ramdisk and sync.
This should happen when the ramdisk is over 100 mb ever 2 minutes a check.
You can use 'lsof' to do it and probably that's the same scheme which is used by Puppy.

But you have to know that it is still not 100% safe. Because a file system allows concurrent access, at one moment your check says the file is not opened, but as soon as you start the copying and deleting the copy on the ramdisk, another process starts opening it for modification or deletion. You can imagine it will result in various confusion to your file system.