I need to do log analysis and I am facing problem that cat access.log* display latest log file first.I tried to sort logs which takes a lot of time because I have logs from couple of years back. And they are already sorted and just displayed in different order than I need it to.So I need to display files contents in folowing order:access.log.4access.log.3....access.logHow do I achieve that?
reverse cat files order
shell;wildcards;cat
Try this:ls -rt access.log* | xargs cat First list the files from oldest to newest and then cat each one of them. 