qwurx [shmem] ~> touch foo.txt
qwurx [shmem] ~> perl -Mautodie=open,unlink -le '$_=pop;open "<", $_;
+unlink $_' foo.txt
qwurx [shmem] ~> ls foo.txt
ls: cannot access foo.txt: No such file or directory
AFAIK...
- Linux: Unlinking a file doesn't break the relation between an open file handle and the file system space allocated for the file; nor does holding an open file handle prevent unlink from succeeding, which is a directory related operation. The file's blocks are open to reallocation after the last reference to the file container is gone
- Windows: Can't delete a busy file (the OS is aware of open file handles pointing to it)
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
|