# File output overwrite?

**URL:** <https://discuss.elastic.co/t/file-output-overwrite/80651>\
**Category:** Logstash\
**Created:** [March 30, 2017, 10:11am UTC](https://discuss.elastic.co/t/file-output-overwrite/80651 "2017-03-30T10:11:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mouss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mouss/32/17097_2.png) [@Mouss](https://discuss.elastic.co/u/Mouss)\
**Post date:** [March 30, 2017, 10:11am UTC](https://discuss.elastic.co/t/file-output-overwrite/80651/1 "2017-03-30T10:11:03Z")

</div>

I would like to use the file output to overwrite an existing file. Right now the new content is appended at the end of the existing file which keeps this file growing

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/a/3a9e07f009675610e4ac036b96323661cee74c27.PNG)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 30, 2017, 10:13am UTC](https://discuss.elastic.co/t/file-output-overwrite/80651/2 "2017-03-30T10:13:57Z")

</div>

This is implemented in [https://github.com/logstash-plugins/logstash-output-file/pull/50](https://github.com/logstash-plugins/logstash-output-file/pull/50) which hasn't been merged and therefore isn't available in a release of the plugin, but you can build a gem locally and install it if you like (or what until it does get merged and released).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 27, 2017, 10:14am UTC](https://discuss.elastic.co/t/file-output-overwrite/80651/3 "2017-04-27T10:14:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
