88

You can install p7zip with Homebrew. So % brew install p7zip % 7za x myfiles.7z Installing Homebrew as @EraserPencil suggested makes sense as the OP might need more programs in the future, which would be at his fingertips then. You can install Homebrew with /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ...


53

If you want to do it from the command line, you can use hdiutil like so: hdiutil create -volname WhatYouWantTheDiskToBeNamed -srcfolder /path/to/the/folder/you/want/to/create -ov -format UDZO name.dmg Man hdiutil for more details.


24

Technically, a .pkg is not a file, but a folder. So maybe collecting it into a single file is essential for downloading.


23

No, ZIP files are never compressed in a lossy way, nor would it really even be possible. Lossy compression algorithms only work for data which can be approximated and still be recognizable to humans. Pictures and audio work for this, but not arbitrary data. ZIP compression algorithms take arbitrary data, and without knowing what it is, compress it ...


15

OS X's tar uses the AppleDouble format to store extended attributes and ACLs. tar and Archive Utility also know how to convert the ._ files back to the native formats, but the ._ files are kept if the archive is extracted on another platform or on a non-HFS volume. You can usually just tell tar to remove the metadata by setting COPYFILE_DISABLE to some ...


14

Data on DMG image can be checked for integrity with Disk utility. You can make it mandatory for the user to agree to license before mounting dmg. It could be locked from modification. You can easily add hidden files and folders on DMG. You can make background image. You can make it safe from stripping during transit through non-metadata aware file systems ...


14

The zip format does not use lossy compression, but the zip command is lossy in a different sense -- it does not include some kinds of Mac-specific file metadata in the archive. The metadata that gets left off is mostly unimportant. I'm talking about things like file tags, Spotlight comments, and such. Mostly. If that's not good enough for you, you can use ...


13

The command line version of Unarchive can extract .7z files.


11

Yes, you can do this using the built-in Disk Images of Mac OS X. A disk image (or DMG file) is a file which, when opened, presents itself as a removable Mac OS X volume, similar to a removable hard drive. Many OS X applications are deployed on disk images. If you encrypt your home directory using FileVault, you're creating a spare bundle disk image. You can ...


10

Simply… cd to the correct directory first. For Example: cd ~/Desktop or alternatively, type cd [space], then drag your folder to terminal to auto-fill the path


9

The standard Mojave setup does have APFS compression implemented, but there's no user visible tools that allows you yourself to select files/folders for compression. It seems that the "ditto" command supplied with macOS is supposed to be able to employ compression on APFS, but it only actually works with HFS+ file systems. However, even though no user ...


8

Open the PDF in Preview. Go to File → Save As… (⌥⇧⌘S) Select Reduce File Size as the Quartz Filter Apple recommends this method in the KB article Mac OS X 10.6: Compressing a PDF file.


7

On Yosemite this did it for me too. Made a small function: dmg(){ hdiutil create -fs HFS+ -srcfolder "$1" -volname "$2" "$2.dmg" } Usage in Terminal: dmg /My/Source/Folder NameOfDmg


7

Some step by step instructions can be found here. After opening Disk Utility: Click the New Image icon Place the contents of folder/directory into the newly created disk image.


7

MacOS does not handle the .7z format natively. The UnArchiver is my favourite tool for handling .7z and many other formats. It is available as both an application and a command line tool if that is how you prefer to operate.


6

One possible reason could be that Safari by default automatically mounts DMG files, and that a Finder window would pop up with the contents. In turn the DMG folder could be styled with for example a background image. I assume that could be considered more user-friendly than having to look in your Downloads folder for an installer, but I agree it's pretty ...


6

You might try adding a custom filter. Reference: http://www.hoboes.com/Mimsy/hacks/quality-reduced-file-size/ The PDF file was nearly 20 megabytes. After saving it with Reduce File Size, it was down to under one megabyte... but the quality of the images was so bad that they didn’t serve to illustrate the concepts in the text. It was obvious ...


6

Looking at the source code for the libarchive package from Apple Open Source for OS X 10.8.5, 10.9, 10.10, and macOS 10.12.3, of which contains the source code for bsdtar, it includes the ability to use xz compression directly in tar, however it was not implemented at compile time until OS X 10.9.0 and later. Although the manual page bsdtar.1 doesn't show ...


5

What you could do is making a little batch file that would use RAR, a shareware command line utility for mac (I did not find any free rar command line utility, but RAR is available as a trial). Installing rar command To install RAR into your terminal, simply copy rar and unrar into your bin folder. To get access to the bin directory, open Terminal.app and ...


5

@williamvoor: The script fails with filepaths which contain spaces, as set the file_name to the POSIX path of this_item does not escape properly. Correct the appropriate line of your code to this: set cmd to "/Users/sn/bin/bin/afsctool -c \"" & file_name & "\"" Explanation: afcstool's file_name argument is surrounded with quotation marks, which ...


5

There are two parts to the answer to your question. How to add a Finder context menu item to “Archive” files: this is easy to achieve by creating an Automator Service (Mac OS X Automation has a good overview of what the Automator services introduced in OS X 10.6 can do): Launch Automator, choose “Service” when prompted for the kind of workflow you want to ...


5

Download those filters: https://github.com/joshcarr/Apple-Quartz-Filters/archive/master.zip Copy them in your mac or user Library ( /Library or /Users/YOURUSERNAME/Library) In a Folder named "Filters" (create if doesn't exist). Open Preview and export as a PDF. Try some of new filter since when you reach the right weight for your pdf.


5

No, if you move the files back to another location on the disk backed up by Time Machine, the next backup will create a new copy of these files on your backup volume. This may even occur if you put them back into the same place (because the files will get a new creation timestamp which AFAIK triggers Time Machine to create a new file on the backup drive). ...


5

The answer is in the Optimize iPhone Storage setting. When enabled, only thumbnails of photos are stored in local storage. By viewing a photo, you are downloading a compressed version from iCloud. There is no quality loss, since the original photos are still accessible by loading them one by one or turning this optimization off. I believe that iCloud Photo ...


4

The easiest way to compress is to just right-click any file and select the appropriate option to create a zip file (without password though). On command-line/Terminal level there are at least zip which supports encryption (zip -P password ...) gzip which doesn't openssl which only encrypts (so compress with gzip first), e.g. openssl enc -aes-256-cbc -e -in ...


4

Yes. The PKZIP format used by Windows is understood by OS X and has been this way since about 10.3. The tool used to extract the contents is called Archive Utility and it is installed by default with every OS X installation. Your Mac-using friend can either double-click on the archive in Finder to extract it or he can right-click/control-click and select ...


4

Here's a simpler script like the one posted by GabLeRoux. rar can be downloaded from from http://www.rarlab.com/download.htm. #!/bin/bash for f in ~/Desktop/*.zip; do d=/tmp/$(uuidgen) unzip "$f" -d $d cd "$d" rm -rf __MACOSX ~/bin/rar a "${f%zip}rar" * rm -r "$d" done


4

ImageOptim? ImageOptim optimizes images — so they take up less disk space and load faster — by finding best compression parameters and by removing unnecessary comments and color profiles. It handles PNG, JPEG and GIF animations. ImageOptim seamlessly integrates various optimisation tools: PNGOUT, AdvPNG, Pngcrush, extended OptiPNG, JpegOptim, ...


4

If you launch Archive Utility directly from /System/Library/CoreServices/, you can create gzip-compressed .cpgz archives, which can have a higher compression rate than zip compression. However if you're compressing already compressed files (like most music and video files), you likely won't get much space savings, if any. If you want to try however, open up ...


4

Why not just use the Create Archive action rather than shell scripting? I created a quick one that has four steps. selects a folder (Ask for Finder Items - Folders only) selects the files (Get Folder Contents) filters the items to not selects any subfolders (Filter Finder Items) pass the files to the Create Archive action


Only top voted, non community-wiki answers of a minimum length are eligible