4 ms·
Cool idea. Here's how to do it in Linux with files: # create the "counters" touch {01..16} # use multitail to show all counters in a grid, 4 colum
by Evidlo 7y ago
Cool idea. Here's how to do it in Linux with files:
# create the "counters"
touch {01..16}
# use multitail to show all counters in a grid, 4 columns
multitail -s 4 *
Now you can write to any of these files
echo hello > 01
echo world > 16
The result looks like this: https://i.imgur.com/yVWWMfr.png https://i.imgur.com/yVWWMfr.png
You can also tell multitail to automatically rescan the directory and display new files
# check current directory for new files once/sec. match any file
multitail -s 4 -q 1 "*"
- Fnoord 7y agoThanks for the heads up on multitail. Here are more multitail examples [1]. Also see the manpage. I had to install multitail from software repositories. You could also just make multiple panes in tmux instead, but I prefer it when tmux is optional. [1] http://www.vanheusden.com/multitail/examples.html http://www.vanheusden.com/multitail/examples.html
- memco 7y agoFor what it’s worth you c an also do tail -f *.log (or equivalent) to tail multiple log files but it shows everything in a single stream instead of giving dedicated output locations. Any time new data comes into a file it will be prefixed by a header so you know which file received new data. But yeah, I’m also excited to know about multitaul—it was the first thing that stood out to me about GOs comment.
- ovi256 7y agoThe composability of Unix tools still amazes me! Great job.
- thrownaway954 7y agothis is incredible. you have no idea how times i have been needing to monitor multiple log files on our server and never new about this. here i am opening multiple ssh terminals and switching between them. you are a life saver.
- Phrodo_00 7y agoYou can also have nice dialogs by using dialog/xdialog/zenity. For example, you can use named pipes and get a nice progress bar: mkfifo progress cat progress | zenity --progress --text='progress' --percentage=0 & echo 10 > progress sleep 10 echo '# Done!' > progress echo 100 > progress https://help.gnome.org/users/zenity/3.32/progress.html.en https://help.gnome.org/users/zenity/3.32/progress.html.en http://linuxcommand.org/lc3_adv_dialog.php http://linuxcommand.org/lc3_adv_dialog.php
- brbsix 7y agoI always use YAD, a much more feature-filled fork of zenity. https://sourceforge.net/projects/yad-dialog/ https://sourceforge.net/projects/yad-dialog/
- rijoja 7y agoah wow great tip, I've done this with tmux / screen earlier and it's really neat when you want to watch multiple log files at the same time.
- jolmg 7y agoRegular `tail -F` also works with multiple files at the same time.
- mxuribe 7y agoHow have i never heard of multitail!?! TIL! Thank you!
- matheusmoreira 7y agoThis is great. Is there a way to remove those borders?