if you've ever run some sort of long running operation in your terminal and it has no progress output or time estimation that can be pretty annoying. luckily there is a program for that! eta (aur:
eta-git) is a terminal command that can be used to monitor the progress of literally anything
how does it work
eta takes 2 arguments, the first is the total number of things to be processed by whatever you're tracking. the second is a command to run to get the current count of things that are done. both the total number argument and the command output will take the first number in the provided text, and ignore any trailing garbage -- this allows you to use things like
wc even though it normally outputs a count with a filename
that's basically it. the readme for the project has a bunch of examples of usage you can reference. but in general it's nice to have a tool that you can meme for any sort of ad-hoc progress for nearly arbitrary stuff you might be doing. here are some things i have personally used eta for
- linux kernel compile progress (inaccurate but like, if you're doing a regular desktop kernel that has most of the config enabled then it's pretty good) --
eta "$(fd -e c | wc -l)" "fd -e o | wc -l"
- downloading files progress. say i have a list of urls in urls.txt and i meme a command like
for url in $(cat ../urls.txt); do wget --content-disposition "$url"; done
now the problem is there's no progress for this, and you don't want to just ctrl-c and start over from the beginning... so you'd do
eta "$(wc -l ../urls.txt)" "ls | wc -l"
- copying files from a slow usb disk with
cp -r... yeah you get the basic idea, this would be like
eta "$(du -bs $src)" "du -bs $dst"
eta is pretty underrated imo. try it out next time you need real time progress for something