FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-09-2010, 02:52 PM
Mark Widdicombe
 
Default how to make the contents of a file disappear after x numbers of days or at date

From: ubuntu-users-bounces@lists.ubuntu.com [ubuntu-users-bounces@lists.ubuntu.com] On Behalf Of Karl Auer [kauer@biplane.com.au]
Sent: 09 September 2010 04:32 PM
On Thu, 2010-09-09 at 14:04 +0000, user1 wrote:
> >> I should be a kind of wipe operation :-)
> > Can you explain what you mean with "disappear"? Should the result be an
> > empty file or e.g. a file with the same length and random data?
>> I mean the result should be an empty file (or a part of a file), where
>> the "wiped" data is gone and cannot be restored.

>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.

Disclaimer
http://www.shopriteholdings.co.za/pages/1019812640/disclaimer/E-mail-Disclaimer.asp



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-09-2010, 04:52 PM
Tim Henderson
 
Default how to make the contents of a file disappear after x numbers of days or at date

On 09/09/10 07:20, user1 wrote:
> Anybody know of a way to make the contents of a file (txt, html, jpeg,
> png, mp3, ogg etc.) disappear after a certain number of days.
>
> To make the whole content or a selected part of a file to disappear.
>
> The charateristic must be hidden in the file and not to be removed by a
> copy.
>
> I should be a kind of wipe operation :-)
>
>

Don't konw how to contain a "wiping" characteristic in the file itself.
On top of that, contain the characteristic, and not be removed. I
think your on to a new file type

I can only think of scripting the process by cron, or sleep commands.

Copy nothing to file:
cp /dev/null FILE
Copy nothing to file in 5 days:
sleep 432000 && cp /dev/null FILE &

Text files:
grep what_you_need FILE > NEWFILE; cat NEWFILE > FILE
tail -# FILE > NEWFILE; cat NEWFILE > FILE
...same goes for head

For the binary types, you're on your own if you want to remove certain
things from the binary. Mass removal easy, altering binary hard.

Tim H.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 06:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org