useful tail on /var/log to avoid old logs or/and gzipped files

tail -f *[!.1][!.gz]
with discard wilcards in bash you can "tail" newer logs files to see what happen, any error, info, warn...
Sample Output
root@llistes:/var/log/mailman# tail -f *[!.1][!.gz]
==> error <==

==> post <==

==> qrunner <==
Mar 06 06:31:51 2009 (30465) OutgoingRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30464) NewsRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30467) RetryRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30466) VirginRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30461) BounceRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30463) IncomingRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30462) CommandRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30460) ArchRunner qrunner caught SIGHUP.  Reopening logs.
Mar 06 06:31:51 2009 (30455) Master watcher caught SIGHUP.  Re-opening log files.

==> smtp <==

==> subscribe <==
Mar 05 13:49:58 2009 (32332) test: new dreg@dreg.com, 
Mar 05 13:49:58 2009 (32332) test: new nice@renice.co.uk, 
Mar 05 13:49:58 2009 (32332) test: new thisisanemail@somailed.it, 

==> vette <==

5
By: piscue
2009-03-06 16:24:44

What Others Think

Really nice !
CodSpirit · 501 weeks and 6 days ago
I was wondering if somebody could explain to me what exactly the function of the square brackets is.
kzh · 482 weeks and 2 days ago
From the bash manpage, under "Pattern Matching", "[...] Matches any one of the enclosed characters." "If the first character following the [ is a ! or a ^ then any character not enclosed is matched." RTFM.
realist · 478 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: