All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Samuel <samuel@bcgreen.com>
To: Aroop MP <aroop@poornam.com>
Cc: Roberto Vanto <roberto-vanto@tiscali.it>, linux-admin@vger.kernel.org
Subject: Re: File size (shortest possible solution)  + don't touch
Date: Mon, 09 Aug 2004 14:14:40 -0700	[thread overview]
Message-ID: <4117E940.1030707@bcgreen.com> (raw)
In-Reply-To: <200408081725.13489.aroop@poornam.com>

the shortest possible:
       ` > somefile `
(( redirect the output of no command at all to somefile ))

Although not necessary, I'll often go
       ` true > somefile `
True does nothing other than return success. The reason why
I like using it is that it makes a placeholder so that a reader
knows that something (or rather explicitly nothing) is happening.


`Touch` doesn't work.. If the file already exists, it will simply
change the last mod-time. without altering the contents

The original purpose of touch (I think) was to convince make(1) that
something needed to be done.

Anindya Mozumdar wrote:
 > Hi,
 >    How can I make a file zero length without deleting the contents of
 >    the file manually through an editor ?
 > Anindya.


-- 
Stephen Samuel +1(604)876-0426                samuel@bcgreen.com
		   http://www.bcgreen.com/~samuel/
    Powerful committed communication. Transformation touching
      the jewel within each person and bringing it to light.

  reply	other threads:[~2004-08-09 21:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08  9:00 File size Anindya Mozumdar
2004-08-08  9:16 ` Sascha Retzki
2004-08-08 11:44 ` Roberto Vanto
2004-08-08 11:55   ` Aroop MP
2004-08-09 21:14     ` Stephen Samuel [this message]
2004-08-09 22:47       ` File size (shortest possible solution) + don't touch Daniel Berlin
2004-08-08 12:01   ` File size Sascha Retzki
2004-08-08 13:10     ` Aroop MP
2004-08-08 13:20       ` Sascha Retzki
2004-08-08 13:57       ` John Julian
2004-08-08 12:44 ` Tim Walberg
2004-08-08 15:45 ` (unknown) Debian UserJens Suelwald
2004-08-09 13:21   ` Adam Lang
2004-08-09  8:41 ` File size Ag. System Administrator
2004-08-09 14:39 ` Scott Taylor
2004-08-10  6:27 ` Andrew Kelly
2004-08-10 13:47 ` Anindya Mozumdar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4117E940.1030707@bcgreen.com \
    --to=samuel@bcgreen.com \
    --cc=aroop@poornam.com \
    --cc=linux-admin@vger.kernel.org \
    --cc=roberto-vanto@tiscali.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.