[GRLUG] Clear the content of a file without deleting it
Bill Pribble
Bill.Pribble at Haworth.com
Thu Dec 29 14:33:49 EST 2005
# ll
total 2
-rw-rw-rw- 1 root sys 16 Dec 29 14:30 bill
drwxr-xr-x 2 root root 96 Dec 28 14:57 lost+found
drwxrwxrwx 2 root sys 96 Dec 29 12:32 tarfiles
# > bill
# ll
total 0
-rw-rw-rw- 1 root sys 0 Dec 29 14:32 bill
drwxr-xr-x 2 root root 96 Dec 28 14:57 lost+found
drwxrwxrwx 2 root sys 96 Dec 29 12:32 tarfiles
#
Thanks
Bill
-----Original Message-----
From: grlug-bounces at grandrapids-lug.org
[mailto:grlug-bounces at grandrapids-lug.org] On Behalf Of Raymond
McLaughlin
Sent: Thursday, December 29, 2005 2:36 PM
To: GRLUG general mailing list
Subject: Re: [GRLUG] Clear the content of a file without deleting it
Justin Denick wrote:
> holy html batman
>
> I've liked echo > file_name
But this leaves a one byte file, he wants to completely clear the file,
i.e 0
byte size. (It could conceivably make a difference.) That one byte is a
line
feed, so what you want is
bash$ echo -n > file_name
> On 12/29/05, Bill Pribble <Bill.Pribble at haworth.com> wrote:
>>
>> # > file_name
>>i know there is a command that will clear the content of a file
without
>>deleting it, but i can not remember what it is
_______________________________________________
grlug mailing list
grlug at grandrapids-lug.org
http://grlug.org/mailman/listinfo/grlug
More information about the grlug
mailing list