[rfc] sed option `-i' (edit in place)

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sat Aug 25 22:10:33 UTC 2007


AFAICS, that option creates a temporary file on the same fs as the edited
file resides on.  And that is indeed optimal, but at the same time
somewhat unfortunate for embedded systems.

Embedded systems usualy place editable files on flash fs and those fs get
used out very much faster compared to real hdfs.  IMO, a better solution
for such cases would be to place the temporary files on a ramfs (usualy
tmpfs) and overrite the original file at the end of the editing session.
This operation is indeed more complicated, but the infrastructure is
available (libbb/copy_file and libbb/remove_file.c).  Obviously this
should be optional and configurable.

What do you think?


Cheers,

-- 
Cristian



More information about the busybox mailing list