cat /directory shows a (somewhat messy) list of files in a directory (even removed files)
Matthew Dillon
dillon at apollo.backplane.com
Sun Mar 26 10:37:55 PST 2006
:When you create some dir, create some files in it, then remove them
:and do a cat /path/to/that/dir you get a messed-up list of files along
:with the removed ones, in some situations this might be considered a
:security threat. The following script ilustrates what i mean:
It's an artifact of the way UFS stores directories. When you
'rm' a file, the directory entry is simply marked invalid rather
than destroyed. The file's data is not destroyed either unless
you overwrite it before deleting it (e.g. with rm -P).
-Matt
More information about the Bugs
mailing list