Something like this may work as well
tail +1 /var/log/messages*
(OR)
Loop through all the files and print them
for filename in /var/log/messages*
do
cat "$filename"
done
Domanda
In my script ; the following line
cat < /var/log/messages*
gives this error :
./msglog: line 5: /var/log/messages*: ambiguous redirect
How can i bypass this error ?
Soluzione
Something like this may work as well
tail +1 /var/log/messages*
(OR)
Loop through all the files and print them
for filename in /var/log/messages*
do
cat "$filename"
done
Altri suggerimenti
I suspect that /var/log/messages* refers to more than one file. what about this..
for i in /var/log/messages*
do
cat < $i
done
use cat /var/log/messages*
or even better something like
sudo tail -f -n5 $(find /var/log -name \*log)