rei0429
rei0429

Reputation: 11

Does anyone know sed -i implementation?

When I executing sed with -i option (replace file) against very large file, is there any way to know how about target file processed. e.g. creating intermediate file at /tmp , or processed on the memory and swapped etc.

Upvotes: 0

Views: 91

Answers (1)

m13r
m13r

Reputation: 2731

strace shows that even for small files the original file is read, the results are written to a temporary file and then renamed to the name of the original file. So I would assume that this is the same behaviour for larger files: a temporary file will be created.

Upvotes: 1

Related Questions