# Using stdin to ingest multiple files at once

**URL:** https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314
**Category:** Logstash
**Created:** [October 25, 2019, 6:59pm UTC](https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314 "2019-10-25T18:59:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)
#### Post date: [October 25, 2019, 6:59pm UTC](https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314/1 "2019-10-25T18:59:38Z")

</div>

I have added stdin { } into the input of my logstash config file. When running it I've been trying to run it with one config file, one call but for 6 files since it is all being ingested into one index. How can I do this in a single call? I want to run each file once only. So:

> /logstash\_run\_path/logstash -f /logstash\_config\_file\_path/logstash\_config\_file \< /file\_\_path/file1

How can I add file2 , file3, file4, etc. to this call?

---

<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: [October 25, 2019, 8:44pm UTC](https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314/2 "2019-10-25T20:44:45Z")

</div>

```
cat file1 file2 file3 | /logstash_run_path/logstash -f /logstash_config_file_path/logstash_config_file
```

---

<div class="post-metadata">

### Author: ![edster](https://avatars.discourse-cdn.com/v4/letter/e/da6949/32.png) [@edster](https://discuss.elastic.co/u/edster)
#### Post date: [November 1, 2019, 2:26pm UTC](https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314/3 "2019-11-01T14:26:13Z")

</div>

Thank you this worked!

---

<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: [November 29, 2019, 2:33pm UTC](https://discuss.elastic.co/t/using-stdin-to-ingest-multiple-files-at-once/205314/4 "2019-11-29T14:33:05Z")

</div>

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