7zip with Ubuntu...brief outline

Discussion in 'all things UNIX' started by Ocky, Aug 30, 2009.

Thread Status:
Not open for further replies.
  1. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,710
    Location:
    George, S.Africa
    In Windows XP I used 7-zip in preference to the very limited built in Windows archiver. I wanted something like it for Ubuntu and yesterday found 7-zip in both Hardy and Jaunty. In Synaptic search for and install p7zip-full. (There is also a p7zip-rar package).
    It is command line only and integrates with File Roller. For instance when right clicking on a folder>Create Archive, File roller will have these extra compression options ..

    Create archive.jpg

    As in the Windows version one can encrypt the archive using a password. There are several choices regarding the algorithms to use e.g. AES 256, but the defaults should be OK - one always runs the risk of someone not being able to open an AES encrypted archive. I can now email encrypted archives containing confidential stuff. :cool:
    Please note that the program is not suitable for backing up purposes as it does not preserve file permissions.
    Mostly I would be using these basic commands:-

    7z a -tzip -pfox test.zip yourfile.txt
    7z a -tzip -pfox test.zip yourfile.txt -mx9 (mx9 = Ultra
    Compression)
    7z a -t7z -mx=9 test.7z yourfile.txt
    7z a -tzip -mx=9 archive.zip Temp/ (For Directories)
    7z a -tzip -mx=9 -pfox test.7z yourfile.txt

    where:-
    -a = add files to archive
    -t = type of archive
    -m = method of compression
    -p = password
    -x = level of compression eg. 9 = Ultra, 7 = Standard, 5 = Default etc

    Examples from the Manual - can get as intricate as you want ..

    7z a -t7z archive.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d23 -m2=LZMA:d19 -m3=LZMA:d19
    -mb0:1 -mb0s1:2 -mb0s2:3

    adds *.exe and *.dll files to archive archive.7z using BCJ2 converter, LZMA with 8 MB dictionary for main output stream (s0), and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.

    7z a -t7z archive.7z *.txt -m0=PPMd

    adds *.txt files to archive archive.7z using PPMd method.

    Now an animated gif (excuse the quality) showing simple creation of a 7zip archive ..

    7zip.gif

    .... and opening the password protected archive by clicking on the 7zip icon ...

    Password.gif
     
    Last edited: Aug 30, 2009
Loading...
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.