Im trying to find the right command to tail a bunch of log files whilst excluding the zipped files in a set directory. The log files are being zipped as they become oversized.
At the moment Im using:
tail -f /var/logs/myLog*
Which works fine, but it will also tail the .gz files which are a garbled mess. I need to tail only files without this extension.
Best Answer
If the filenames have anything else in common - e.g. length of name, number of periods in name, name ending... you can simply adjust your glob.
If not, there are some other ways:
or, using xargs: