# How does logstash identify files?

**URL:** <https://discuss.elastic.co/t/how-does-logstash-identify-files/172688>\
**Category:** Logstash\
**Created:** [March 17, 2019, 6:20pm UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688 "2019-03-17T18:20:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiteshKhanna](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@GiteshKhanna](https://discuss.elastic.co/u/GiteshKhanna)\
**Post date:** [March 17, 2019, 6:20pm UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688/1 "2019-03-17T18:20:42Z")

</div>

How does logstash identify files? By using inode or just the filename?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 17, 2019, 7:33pm UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688/2 "2019-03-17T19:33:18Z")

</div>

On UNIX platforms the file input uses the inode number.

---

<div class="post-metadata">

**Author:** ![GiteshKhanna](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@GiteshKhanna](https://discuss.elastic.co/u/GiteshKhanna)\
**Post date:** [March 18, 2019, 10:26am UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688/3 "2019-03-18T10:26:32Z")

</div>

@Badger  
So, if I rename a file, will logstash consider it to be the same file, or will it start processing it from the beginning?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 18, 2019, 12:14pm UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688/4 "2019-03-18T12:14:27Z")

</div>

The file input has code to handle file rotation.

---

<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 15, 2019, 12:14pm UTC](https://discuss.elastic.co/t/how-does-logstash-identify-files/172688/5 "2019-04-15T12:14:44Z")

</div>

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