[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to create an empty file?
From: |
Jim Meyering |
Subject: |
Re: How to create an empty file? |
Date: |
Mon, 25 Jan 2010 18:41:01 +0100 |
Mike Frysinger wrote:
> On Monday 25 January 2010 12:22:09 Peng Yu wrote:
>> 'touch' will not make the file size empty if the file is not empty. I
>> don't not want to use 'rm -f' first then touch because I might
>> accidentally remove something if I type anything wrong. Could somebody
>> let me a better way to create an empty file?
>
>>file
Right.
Note however, that for some shells you have to provide a command
before the ">", so you may prefer this:
: > file