Menu

7z extraction of RAR file in UNIX

Help
2017-11-03
2017-11-03
  • shanit saha

    shanit saha - 2017-11-03

    We have recently installed 7z utility in our UNIX cetos environment. We are able to uncompress all other formats except for RAR / WinRAR files. On trying to do that I am getting this message Can not open the file as archive I tried the same .rar file to open in windows both with command prompt ; It works all good.

    I tried both these commands in UNIX shell
    7z x /home/user01/WORK/PRACTICE/data/FileX.rar -o/home/ssaha01/WORK/data/7zUNCOMPRESS/RarOutput -y -spf -r

    AND

    ** 7z x -aot /home/ssaha01/WORK/PRACTICE/data/FileX.rar -o/home/user01/WORK/data/7zUNCOMPRESS/RarOutput -y -spf -r**

    The above commands though did extract the other compression formats.
    Looking forward to be advised at your earliest

    Thanks and Regards
    Shanit

     
  • Igor Pavlov

    Igor Pavlov - 2017-11-03

    show the log:

    7z i > i.txt
    7z t /a.rar 1> 1.txt 2> 2.txt
    

    /a.rar - path to your rar.

     
  • shanit saha

    shanit saha - 2017-11-03

    Thank You! for your spontaneous response. I have attached three file by executing your command customized to my file path . The files are as below
    1) i.txt
    2) 1st.txt
    3) 2nd.txt

    Thanks and Regards
    Shanit

     
  • Igor Pavlov

    Igor Pavlov - 2017-11-03

    fedora/centos have removed 7-zip's unrar code as non-free code.
    Maybe you can use p7zip compiled for another linux systems with 7-zip's unrar plugin:
    p7zip-full and p7zip-rar

    RAR code is divided into two parts in p7zip:
    1) free part of unrar (in p7zip-full)
    2) non-free part of unrar (p7zip-rar)

    But fedora have removed both parts of unrar code.

     
  • shanit saha

    shanit saha - 2017-11-03

    Igor Thank You for responding in so less time.
    Any idea of how much $ would need for the "non-free part of unrar"

     
  • Igor Pavlov

    Igor Pavlov - 2017-11-03

    p7zip-rar is free for money.
    It's not 100% free for some types of source code changes.
    It's limitation from original unrar source ocde.

     

Log in to post a comment.

MongoDB Logo MongoDB