With archives containing more than 30 files, list of extracted files quickly stops being interesting. I a making a script that extracts a .war archive into a tomcat app folder:

image description

When looking in help for 7z command, I noticed this line:

  -bd: Disable percentage indicator

Well, I would really like to enable percentage indicator and use it instead of insane file list. How would I do it? Something like:

image description

But frankly, one line percentage indicator like bellow would be enough:

Progress: 30%
  • 1
    unfortunately it seems to not be possible in a clean way superuser.com/questions/702122/… – lese Oct 6 '15 at 14:02
  • @lese So the switch in help is just an error then? – Tomáš Zato Oct 6 '15 at 14:04
  • 1
    If you don't require 7-zip to be used you could try pv <file> | jar xf /dev/stdin. – Marco Oct 6 '15 at 14:48
  • @Marco Seems that jar is not installed on debian by default... 7zip was. Isn't there another alternative? – Tomáš Zato Oct 6 '15 at 15:27
  • Neither pv, nor jar is installed in a default Debian installation. If you only can use certain tools you should mention that in the question. This task is not easy using arbitrary tools, but if you require only a limited toolset, I doubt there will be many answers. – Marco Oct 6 '15 at 15:44

If you are trying to do this using standard utilities, you are definitely going to have to find a very hacky workaround. Otherwise use whiptail -- http://xmodulo.com/create-dialog-boxes-interactive-shell-script.html or pv -- http://www.ivarch.com/programs/pv.shtml.


You're really using p7zip v9.20, the portable version for Unix. 7zip is a Windows program that has a GUI and command-line operation, its documentation doesn't necessarily always apply to p7zip. v9.20 quite old now (~2011), though there were no new releases until 2015. The distributed man pages are untouched since 2007, even in the latest version.

The portable p7zip v16.02 does have a progress indicator (and -bd does disable it). There doesn't seem to be a Changelog just for the portable version so I can't say when it was added, other than after v9.20.1 which I have confirmed does not have it either.

Otherwise, general purpose solutions include pmonitor (requires lsof) as suggested by Marco, or progress (Linux specific). See also this question for further information: Pipe Viewer - Progress monitor performance consequence (my answer there has a script that shows how you might extract the required information from /proc without extra tools).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.