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.

_______________________________________________
bug-ed mailing list
bug-ed@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-ed

Reply via email to