|
From: | Antonio Diaz Diaz |
Subject: | Re: [Bug-ed] editing a large file with ed |
Date: | Tue, 31 Jul 2012 19:20:04 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905 |
Hello, Enda wrote:
$ ed largefile No space left on device 1,$d w 0 q I am trying to empty the contents of a file. The above works, but should I be worried about the "No space left on device" warning.
As Claudio said, it would help to know which version of ed you are using. Current version of GNU ed will fail with an exit status of 2 if "largefile" is a regular file, or ignore the error otherwise.
Claudio is also probably right in that you are just out of space in /tmp.Is there any reason to read the whole "largefile" in /tmp just to truncate it, instead of, say, doing a "rm" followed by a "touch"?
Regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |