Extracting a 7-Zip file “silently” - command line option

后端 未结 14 2273
南笙
南笙 2021-02-06 23:19

I want to extract a 7-Zip archive in a Python script. It works fine except that it spits out the extraction details (which is huge in my case).

Is there a way to avoid t

14条回答
  •  后悔当初
    2021-02-07 00:04

    To show just the last 4 lines...

    7z x -y some_archive.7z | tail -4
    

    gives me:

    Everything is Ok
    
    Size:       917519
    Compressed: 171589
    

    The switch -y is to answer yes to everything (in my case to override existing files).

提交回复
热议问题