I'm new to Mac OS X and am not sure how to do this:
I have three directories. I want to create a tar/zip file of them so that I can attach them to an email.
Any ideas?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI'm new to Mac OS X and am not sure how to do this:
I have three directories. I want to create a tar/zip file of them so that I can attach them to an email.
Any ideas?
OSX ships with tar
. From the Terminal, you can simply do this:
tar czf archive_folder_name.tar.gz folder_to_copy
Replace archive_folder_name.tar.gz
with whatever you want to call the newly created archive, and folder_to_copy
with whatever is the name of the folder you want to archive.
tar cjf
for bzip instead of gzip (Smaller files) but that's just a personal preference I suppose.
– Matthew Scharley
Sep 24 '09 at 23:45
If you are looking for a GUI solution, simply use the compress command fron the contextual menu.
If you are interested in command-line solutions, several options are possible.
You may of course use the tar command.
tar -zcvf archive.tar.gz folder
But if you are sharing archives, some people may prefer a zip file, that you could create with the zip command
zip -r archive.zip folder
Ok Ok. It's very funny & silly.
But I think I found the option.
Right click on the folder that you want to compress.
Compress option is available.
Well, other than GUI you can use console (or install some kind of compressing software like StuffixExpander or something like that if you don't like the default one or need more formats)
tar --help
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -cf archive.tar foo bar
only creates an archive, but doesn't compress the contents. To compress you should add for example the -z
(gzip) or -j
(bzip2) to actually compress the files.
– Koen.
Jan 6 '17 at 22:16
I downloaded guitar otherwise known as GUI tar, this allows you to use a gui to tar files instead of going into the terminal. To create a zip you can double press or right click the folder or file and press compress.