Ok, so "rm" works. Then you have things like "mv *.c /usr/src" to worry
about. Lock for traversal, get stuck unable to work on the files.
A "dream" solution for this might involve something like:
Directory is traversed in some well defined order (defined by the fs)
Removing a file (or moving it out of the directory) leaves
a "empty" directory entry that isn't reclaimed until no more
traversals is in progress in that directory.
New files can be created, and will be created further out than
any traversal in progress so nothing will be missed.
This approach don't lock anything out, but I guess someone evil still
could cause trouble by keeping a traversal going forever, creating one dummy
file and deleting one whenever it makes progress. The directory would
get big, filled up with placeholders until some ulimit kicks in.
Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/