Tux

...making Linux just a little more fun!

Delete the contents

sunil pradhan [kumar22.sunil at gmail.com]


Fri, 11 Apr 2008 17:56:11 +0530

Hi Sir ,

Can you help me how to delete the contents of the file..

Thanks

Sunil Pradhan.

919986209798


Top    Back


Neil Youngman [ny at youngman.org.uk]


Fri, 11 Apr 2008 13:35:53 +0100

On Friday 11 April 2008 13:26, sunil pradhan wrote:

> Hi Sir ,
>
> Can you help me how to delete the contents of the file..

You may be looking for the shred command?

HTH

Neil Youngman


Top    Back


Neil Youngman [ny at youngman.org.uk]


Fri, 11 Apr 2008 18:59:35 +0100

On Friday 11 April 2008 18:25, you wrote:

>
> On 4/11/08, Neil Youngman <[email protected]> wrote:
> > On Friday 11 April 2008 13:26, sunil pradhan wrote:
> > > Hi Sir ,
> > >
> > > Can you help me how to delete the contents of the file..
> >
> > You may be looking for the shred command?
> >
> > HTH
> >
> > Neil Youngman
>  No sir ,
>
> i want to delete the contents of the file without deleteing the file....
>
> Thanks for  your quick response sir..

If you read the manual page for shred it says "The default is not to remove the files".

If you just wish to truncate the file 'echo -n > filename' will leave a zero length file, but the original data will still be somewhere on the disk, so it's not a secure delete.

HTH

Neil Youngman


Top    Back