how to make the contents of a file disappear after x numbers of days or at date

Karl Auer kauer at biplane.com.au
Thu Sep 9 15:14:43 UTC 2010


On Thu, 2010-09-09 at 16:52 +0200, Mark Widdicombe wrote:
> >You can't create a data file that "deletes itself" - at least not in any
> >common operating system and not under Linux.
> 
> I don't see why not.  You can incorporate a routine in the file
> (assuming it's executable) that would check the date and if it's
> greater than a certain date calls an OS routine that will delete the
> file stored on disk.  It won't effect the file in memory, but the next
> time the file tries to load it won't be there.

The OP wrote about image files. Not sure where you would splice in such
a routine.

But my statement stands for ALL files in a non-object-oriented operating
system; even an executable has to be run by something outside itself. No
file can "delete itself".

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)                   +61-2-64957160 (h)
http://www.biplane.com.au/kauer/                   +61-428-957160 (mob)

GPG fingerprint: B386 7819 B227 2961 8301 C5A9 2EBC 754B CD97 0156
Old fingerprint: 07F3 1DF9 9D45 8BCD 7DD5 00CE 4A44 6A03 F43A 7DEF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100910/17054e56/attachment.sig>


More information about the ubuntu-users mailing list