Commands tagged 7zip (7)

  • Using 7z to create archives is OK, but when you use tar, you preserve all file-specific information such as ownership, perms, etc. If that's important to you, this is a better way to do it.


    8
    tar cf - /path/to/data | 7z a -si archivename.tar.7z
    slashdot · 2009-07-14 14:21:30 7
  • Sometimes it is handy to be able to list contents of a tar file within a compressed archive, such as 7Zip in this instance, without having to extract the archive first. This is especially helpful when dealing with larger sized files.


    2
    7z x -so testfile.tar.7z | tar tvf -
    slashdot · 2009-07-15 21:00:58 4
  • Creates a solid archive with the highest possible compression (Ultra). Advantage of 7z is that it will use all the processor cores to create the archive. (Ok. at least version 9.04 does) Show Sample Output


    2
    7z a -mx=9 -ms=on archive.7z files_for_archiving/
    nssy · 2011-10-22 09:26:42 5
  • These re the best option combination that works fine for compressing my database dumps. It's possible that there are another option or value that might improve the compression ratio, by these are the ones that worked, the syntax for 7zr it's a little messy...


    1
    7zr a -mx=9 -ms=on -mhc=on -mtc=off db_backup.sql.7z db_dump.sql
    mandx · 2010-10-22 21:05:58 3
  • Compress files or a directory to xz format. XZ has superior and faster compression than bzip2 in most cases. XZ is superior to 7zip format because it can save file permissions and other metadata data.


    1
    tar -cJf myarchive.tar.xz /path/to/archive/
    Sepero · 2014-03-13 03:34:18 6
  • compress directory archive with xz compression, if tar doesn't have the -J option (OSX tar doesn't have -J)


    1
    tar -cvf - /path/to/tar/up | xz - > myTarArchive.tar.xz
    razerwolf · 2014-03-18 19:51:50 7
  • Create a 7zip archive named "some_directory.7z" and adds to it the directory "some_directory". The `-mhe=on` is for header encryption, basically it mangles the file names so no one knows whats inside the 7z. If -mhe=on wasn't included, then a person without the password would still be able to view the file names inside the 7z. Having this option ensures confidentiality. To ensure the result is small use lzma2, level 9 compression. Lzma2 fast bytes range from 5 to 272, the higher the number the more aggressive it is at finding repetitive bytes that can be added to the dictionary. Here the fast bytes are set to 64 bytes and the dictionary is 32 MB. Depending on your purposes (the directory size and desired file size), you can be more aggressive with these values. Lastly, `-ms=on` just says concatenate all the individual files and treat them as a singular file when compressing. This leads to a higher compression ratio generally.


    0
    7z a -t7z -mhe=on -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on some_directory.7z some_directory/
    keyboardsage · 2024-03-16 23:36:38 4

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

force unsupported i386 commands to work on amd64
The above was done using the i386 flashplayer plugin, and was installed on a AMD64 machine running an AMD64 kernel and AMD64 programs. the resulting plugin install ultimately didn't work for swiftfox (but worked for iceweasel) without also covering it with a nspluginwrapper which took a bit of fenangaling to get to work (lots of apt-getting) but it is a nice feature to be able to trick installers that think you need i386 into running on a amd64, or at least attempting to run on amd64. Enjoy

Gets the english pronunciation of a phrase
Usage examples: say hello say "hello world" say hello+world

Generat a Random MAC address
Generate a random MAC address with capital letters

Extract tarball from internet without local saving

Check whether laptop is running on battery or cable
The original proc file doesn't exist on my system.

Install pip with Proxy
Installs pip packages defining a proxy

Track X Window events in chosen window
After executing this, click on a window you want to track X Window events in. Explaination: "xev will track events in the window with the following -id, which we get by greping window information obtained by xwininfo"

dont execute command just add it to history as a comment, handy if your command is not "complete" yet

list files recursively by size

Get the IP address
gives u each configured IP in a seperate line.


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: