<p>If all the files are there without any extension then yes you can execute the cat command with * (cat <em>) it will display the content of each and every files underneath this directory, but here in your output it has the zip files (</em>.gz) too, so you need to execute 2 commands rather than single command...</p>

<ol>
<li>cat syslog syslog.1</li>
<li>zcat *.gz</li>
</ol>

<p>Hope this will helps.</p>

CC BY-SA 4.0
2019-07-17T09:13:29.523Z
This doesn't guarantee the proper ordering, right?
Anatoli Babenia
CC BY-SA 4.0
2019-06-17T19:09:45.383Z
2019-06-17T19:09:45.383Z
Prithvirajan Balakrishnan
<p>Is there a command to view logrotated logs as a continuous stream with proper ordering?</p>

<p>I need to view all entries in syslog in historical order starting from the oldest entry available. So far I was inspecting logs one by one manually.</p>

<pre><code>-rw-r-----   1 syslog    adm             140368 Jun 12 09:41 syslog
-rw-r-----   1 syslog    adm              45498 Jun 12 06:25 syslog.1
-rw-r-----   1 syslog    adm               1874 Jun 11 06:25 syslog.2.gz
-rw-r-----   1 syslog    adm               1758 Jun 10 06:25 syslog.3.gz
-rw-r-----   1 syslog    adm               1615 Jun  9 06:25 syslog.4.gz
-rw-r-----   1 syslog    adm              28494 Jun  8 06:25 syslog.5.gz
-rw-r-----   1 syslog    adm              92359 Jun  7 06:53 syslog.6.gz
-rw-r-----   1 syslog    adm              13849 Jun  6 09:21 syslog.7.gz
</code></pre>

CC BY-SA 4.0
2019-06-17T21:10:02.393Z
journalctl doesn't work in your scenario ?
Marged
CC BY-SA 4.0
2019-07-17T09:11:37.733Z
@Marged are you sure that `journalctl` includes all info from `syslog` for postmortem analysis? I've got an impression that `syslog` is independent of `systemd/journalctl` and it is written even if those both are killed, for example with out of memory.
Anatoli Babenia
CC BY-SA 4.0
2019-07-17T11:49:43.050Z
I wouldn't bet money on it ;-)
Marged
<logging>
View logrotated log continuously
Anatoli Babenia
# View logrotated log continuously

(Asked by: username_0 on 2019-06-17)

Is there a command to view logrotated logs as a continuous stream with proper ordering?
I need to view all entries in syslog in historical order starting from the oldest entry available. So far I was inspecting logs one by one manually.
-rw-r-----   1 syslog    adm             140368 Jun 12 09:41 syslog
-rw-r-----   1 syslog    adm              45498 Jun 12 06:25 syslog.1
-rw-r-----   1 syslog    adm               1874 Jun 11 06:25 syslog.2.gz
-rw-r-----   1 syslog    adm               1758 Jun 10 06:25 syslog.3.gz
-rw-r-----   1 syslog    adm               1615 Jun  9 06:25 syslog.4.gz
-rw-r-----   1 syslog    adm              28494 Jun  8 06:25 syslog.5.gz
-rw-r-----   1 syslog    adm              92359 Jun  7 06:53 syslog.6.gz
-rw-r-----   1 syslog    adm              13849 Jun  6 09:21 syslog.7.gz

**Tags:** logging

> **Comments:**
> **username_1**: journalctl doesn't work in your scenario ?  
> **username_0**: @username_1 are you sure that `journalctl` includes all info from `syslog` for postmortem analysis? I've got an impression that `syslog` is independent of `systemd/journalctl` and it is written even if those both are killed, for example with out of memory.  
> **username_1**: I wouldn't bet money on it ;-)  

---

## 1 answers

### Answer by username_2 on 2019-06-17. Score: 1

If all the files are there without any extension then yes you can execute the cat command with \* (cat *) it will display the content of each and every files underneath this directory, but here in your output it has the zip files (*.gz) too, so you need to execute 2 commands rather than single command...

1. cat syslog syslog.1
2. zcat \*.gz

Hope this will helps.

> **Comments:**
> **username_0**: This doesn't guarantee the proper ordering, right?  

---

