How do I make a zip file on linux? - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (/opensearch.xml) (https://stackoverflow.com/questions/24418651/how-do-i-make-a-zip-file-on-linux) (https://cdn.sstatic.net/Shared/stacks.css?v=d6a266655a25) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=22fb2cb11723) (Feed for question 'How do I make a zip file on linux?') (/feeds/question/24418651) (https://cdn.sstatic.net/Shared/Channels/channels.css?v=5981bb1a5bd7) (https://accounts.google.com/gsi/style) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (/legal/terms-of-service/public) terms of service and acknowledge you have read our (/legal/privacy-policy) privacy policy . (80823973848d5aac2ae197737f179bc4b30ac67c67491815ce58aee3b012cf60) (1) (2.0) Sign up with Google Sign up with GitHub OR (80823973848d5aac2ae197737f179bc4b30ac67c67491815ce58aee3b012cf60) (1) () () () () () () Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (80823973848d5aac2ae197737f179bc4b30ac67c67491815ce58aee3b012cf60) () Skip to main content (https://stackoverflow.com) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-for-teams) Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-advertising) Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-ai) OverflowAI GenAI features for Teams (https://stackoverflow.co/api-solutions/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-api) OverflowAPI Train & fine-tune LLMs (https://stackoverflow.co/labs/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=labs) Labs The future of collective knowledge sharing (https://stackoverflow.co/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=about-the-company) About the company (https://stackoverflow.blog/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=blog) Visit the blog (Search…) () Loading… (https://stackoverflow.com) current community (https://stackoverflow.com) (Stack Overflow) Stack Overflow (https://stackoverflow.com/help) help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) chat (https://meta.stackoverflow.com) (Meta Stack Overflow) Meta Stack Overflow your communities (https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f24418651%2fhow-do-i-make-a-zip-file-on-linux) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f24418651%2fhow-do-i-make-a-zip-file-on-linux) log in to customize your list. (https://stackexchange.com/sites) more stack exchange communities (https://stackoverflow.blog) company blog (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f24418651%2fhow-do-i-make-a-zip-file-on-linux) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f24418651%2fhow-do-i-make-a-zip-file-on-linux) Sign up Let's set up your homepage Select a few topics you're interested in: python javascript c# reactjs java android html flutter c++ node.js typescript css r php angular next.js spring-boot machine-learning sql excel ios azure docker Or search from our full list: (Search) javascript python java c# php android html jquery c++ css ios sql mysql r reactjs node.js arrays c asp.net json python-3.x .net ruby-on-rails sql-server swift django angular objective-c excel pandas angularjs regex typescript ruby linux ajax iphone vba xml laravel spring asp.net-mvc database wordpress string flutter postgresql mongodb wpf windows amazon-web-services xcode bash git oracle-database spring-boot dataframe azure firebase list docker multithreading vb.net react-native eclipse algorithm powershell macos visual-studio numpy image forms scala function vue.js performance twitter-bootstrap selenium winforms kotlin loops express dart hibernate sqlite matlab python-2.7 shell rest apache entity-framework android-studio csv maven linq qt dictionary unit-testing asp.net-core facebook apache-spark tensorflow file swing class unity-game-engine sorting date authentication go symfony t-sql opencv matplotlib .htaccess google-chrome for-loop datetime codeigniter http perl validation sockets google-maps object uitableview xaml oop if-statement visual-studio-code cordova ubuntu web-services email android-layout github spring-mvc elasticsearch kubernetes selenium-webdriver ms-access user-interface parsing ggplot2 pointers google-sheets machine-learning c++11 security google-apps-script flask ruby-on-rails-3 templates nginx variables exception sql-server-2008 gradle debugging tkinter listview delphi jpa asynchronous web-scraping pdf haskell jsp ssl amazon-s3 google-cloud-platform jenkins testing xamarin wcf npm batch-file generics ionic-framework network-programming unix recursion google-app-engine mongoose visual-studio-2010 .net-core android-fragments assembly animation next.js math session svg hadoop intellij-idea curl django-models rust join winapi laravel-5 url heroku http-redirect tomcat google-cloud-firestore inheritance webpack keras image-processing gcc asp.net-mvc-4 logging dom swiftui web matrix pyspark actionscript-3 button post optimization firebase-realtime-database jquery-ui iis cocoa xpath d3.js javafx firefox internet-explorer xslt caching select asp.net-mvc-3 opengl events asp.net-web-api plot dplyr magento encryption search stored-procedures amazon-ec2 ruby-on-rails-4 memory audio canvas multidimensional-array jsf random vector cookies redux input facebook-graph-api flash xamarin.forms indexing arraylist ipad cocoa-touch data-structures video apache-kafka model-view-controller serialization jdbc woocommerce azure-devops routes razor awk servlets mod-rewrite beautifulsoup excel-formula docker-compose filter iframe aws-lambda design-patterns text django-rest-framework visual-c++ cakephp mobile android-intent react-hooks struct methods groovy mvvm ssh lambda checkbox ecmascript-6 google-chrome-extension time grails installation sharepoint cmake shiny spring-security jakarta-ee android-recyclerview plsql core-data types meteor android-activity sed bootstrap-4 websocket activerecord graph replace scikit-learn file-upload group-by vim junit boost deep-learning sass import memory-management error-handling async-await eloquent dynamic soap silverlight dependency-injection charts layout apache-spark-sql deployment browser gridview svn while-loop google-bigquery vuejs2 ffmpeg dll highcharts view foreach plugins makefile c#-4.0 redis reporting-services jupyter-notebook merge server unicode https reflection google-maps-api-3 twitter oauth-2.0 extjs pytorch axios terminal pip split cmd mysqli encoding django-views automation database-design collections hash netbeans build data-binding ember.js tcp sqlalchemy pdo apache-flex concurrency entity-framework-core command-line spring-data-jpa printing java-8 react-redux jestjs service html-table neo4j lua ansible material-ui parameters module enums flexbox visual-studio-2012 promise outlook firebase-authentication webview web-applications uwp jquery-mobile utf-8 datatable python-requests parallel-processing drop-down-menu colors scroll hive scipy tfs count syntax ms-word twitter-bootstrap-3 ssis google-analytics fonts three.js powerbi rxjs constructor graphql file-io paypal discord cassandra socket.io graphics compiler-errors gwt react-router nlp solr url-rewriting backbone.js memory-leaks datatables oauth terraform datagridview drupal oracle11g zend-framework neural-network knockout.js triggers django-forms interface google-api angular-material casting jmeter linked-list path proxy timer django-templates arduino orm directory parse-platform visual-studio-2015 windows-phone-7 cron push-notification conditional-statements primefaces functional-programming pagination model jar xamarin.android hyperlink uiview gitlab visual-studio-2013 vbscript google-cloud-functions azure-active-directory jwt download swift3 sql-server-2005 configuration process rspec pygame properties combobox callback windows-phone-8 linux-kernel safari permissions scrapy raspberry-pi scripting emacs clojure x86 scope io compilation expo mongodb-query responsive-design nhibernate angularjs-directive azure-functions request bluetooth dns 3d binding reference architecture discord.js playframework version-control pyqt doctrine-orm package get sql-server-2012 rubygems f# autocomplete openssl datepicker kendo-ui tree jackson controller yii pycharm nested grep xamarin.ios static dockerfile statistics transactions null datagrid active-directory uiviewcontroller webforms phpmyadmin discord.py notifications sas computer-vision duplicates mocking youtube nullpointerexception yaml menu sum bitmap blazor asp.net-mvc-5 electron visual-studio-2008 time-series yii2 jsf-2 css-selectors stl android-listview floating-point cryptography ant stream hashmap character-encoding msbuild sdk asp.net-core-mvc google-drive-api selenium-chromedriver jboss cors joomla navigation devise anaconda background camera multiprocessing pyqt5 binary cuda frontend linq-to-sql iterator mariadb onclick plotly ios7 rabbitmq android-jetpack-compose microsoft-graph-api android-asynctask tabs laravel-4 insert environment-variables uicollectionview amazon-dynamodb linker xsd console coldfusion upload continuous-integration ftp textview opengl-es vuejs3 operating-system mockito macros localization formatting xml-parsing json.net kivy type-conversion data.table timestamp calendar integer segmentation-fault android-ndk drag-and-drop prolog char crash jasmine automated-tests dependencies geometry android-gradle-plugin itext firebase-cloud-messaging header fortran sprite-kit mfc attributes nuxt.js azure-pipelines nosql format nestjs odoo db2 jquery-plugins jenkins-pipeline leaflet event-handling flutter-layout annotations postman julia keyboard textbox arm visual-studio-2017 gulp libgdx stripe-payments synchronization xampp timezone crystal-reports dom-events uikit azure-web-app-service android-emulator swagger wso2 sequelize.js namespaces aggregation-framework uiscrollview jvm google-sheets-formula chart.js com subprocess geolocation centos webdriver snowflake-cloud-data-platform html5-canvas garbage-collection widget dialog numbers concatenation qml sql-update set tuples windows-10 java-stream smtp mapreduce ionic2 rotation modal-dialog spring-data android-edittext http-headers nuget doctrine radio-button sonarqube grid lucene xmlhttprequest internationalization listbox initialization switch-statement components google-play apache-camel boolean serial-port ldap ios5 youtube-api gdb return latex pivot eclipse-plugin frameworks tags containers github-actions dataset asp-classic label subquery foreign-keys c++17 copy uinavigationcontroller delegates google-cloud-storage migration struts2 base64 protractor embedded find sql-server-2008-r2 queue uibutton arguments composer-php append jaxb zip stack cucumber autolayout ide entity-framework-6 popup iteration tailwind-css airflow windows-7 r-markdown ssl-certificate vb6 gmail hover jqgrid g++ udp range Next You’ll be prompted to create an account to view your personalized homepage. (/) Home (/questions) Questions (/tags) Tags (/beta/discussions) Discussions Labs (https://chat.stackoverflow.com/?tab=all&sort=active) Chat (/users) Users (/jobs?source=so-left-nav) Jobs (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Collectives Communities for your favorite technologies. (/collectives-all) Explore all Collectives Teams () Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Try Teams for free (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams-compact) Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. (/collectives) Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. (https://stackoverflow.co/teams/) Learn more about Teams (Illustration of upvote icon after it is clicked) Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can save this post to reference later. Save this post for later Not now (Illustration of upvote icon after it is clicked) Hang on, you can't downvote just yet. You'll need to complete a few actions and gain 125 reputation points before being able to downvote. Casting downvotes indicate issues with quality, effort, or accuracay of a post. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can try suggesting an edit to improve the post. Suggest edit No thanks (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/24418651/how-do-i-make-a-zip-file-on-linux) How do I make a zip file on linux? (/questions/ask) Ask Question (2014-06-25 21:11:35Z) Asked 10 years, 9 months ago Modified (?lastactivity) (2024-07-29 22:32:56Z) 8 months ago (Viewed 94,988 times) Viewed 95k times This question shows research effort; it is useful and clear (70:3:31e,16:7ddc7a04837c046c,10:1744819861,16:99d5fc1244ddfb4e,8:24418651,82cb0d56a2173115c8d1dadb8f8660adfb105bfd6bb4e34963c9cb5b2f6ff75f) 42 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:b2646eadb86dfd18,10:1744819861,16:96995ebfcef68208,8:24418651,e9a2637788589e99c37586fe1535240b56fb0db222f99f6251d9478534314294) Save this question. (/posts/24418651/timeline) Show activity on this post. zip -h is confusing! I just want to know how to make a .zip from a directory. kthxbi (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/zip) (show questions tagged 'zip') zip (/questions/tagged/command-line-interface) (show questions tagged 'command-line-interface') command-line-interface (/q/24418651) (Short permalink to this question) Share Share a link to this question Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 Follow (70:3:31e,16:7e1b0a5355a64867,10:1744819861,16:8cc6e7cb07de42cd,8:24418651,cc0dbd7a620cf06022f96585b4b5600565154b917cb5a7591f539b4aa0e1980c) Follow this question to receive notifications (/posts/24418651/revisions) (show all edits to this post) edited (2014-06-26 08:20:16Z) Jun 26, 2014 at 8:20 Dan asked (2014-06-25 21:11:35Z) Jun 25, 2014 at 21:11 (/users/1278913/dan) (Dan's user avatar) (/users/1278913/dan) Dan Dan (reputation score) 685 (1 gold badge) 1 1 gold badge (6 silver badges) 6 6 silver badges (10 bronze badges) 10 10 bronze badges (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 6 Answers 6 Sorted by: (/questions/24418651/how-do-i-make-a-zip-file-on-linux?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful (70:3:31e,16:745676939101a445,10:1744819861,16:8157f08efb32ef56,8:24418785,e5b7e278d15bffe52a4e20c8b342b859f211a4c9f9d2bc2ecb24c8a557060b07) 49 (This answer is not useful) (70:3:31e,16:431698bbca307b1a,10:1744819861,16:0069f3ab8bf19e93,8:24418785,f939c89ead3bde6b67a73106f8af45b1c137ce03035445b7622d944ec62f644f) Save this answer. (Loading when this answer was accepted…) (/posts/24418785/timeline) Show activity on this post. zip -r archive.zip dir_to_zip from man zip -r --recurse-paths Travel the directory structure recursively; for example: zip -r foo.zip foo or more concisely zip -r foo foo In this case, all the files and directories in foo are saved in a zip archive named foo.zip,including files with names starting with ".", since the recursion does not use the shell's file-name substitution mechanism... Even if it functions well I would like to propose you 7z((http://www.7-zip.org/) http://www.7-zip.org/ ). 7za a directory.7z directory It has a better compression and it is opensource , GNU LGPL license, freely available for windows,linux,BSD... BTW it creates/opens 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM,and open unpack only: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z. [They should pay me for advertisement :-)] (/a/24418785) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 Follow (70:3:31e,16:cac6195eb85af833,10:1744819861,16:85c501eaa3f5d6ca,8:24418785,aa72fd822cda10d623709effca7d5d4dd9e402d3394a45db7fa94404a09918a0) Follow this answer to receive notifications (/posts/24418785/revisions) (show all edits to this post) edited (2014-06-26 08:55:36Z) Jun 26, 2014 at 8:55 answered (2014-06-25 21:20:31Z) Jun 25, 2014 at 21:20 (/users/3569208/hastur) (Hastur's user avatar) (/users/3569208/hastur) Hastur Hastur (reputation score) 2,908 (33 silver badges) 33 33 silver badges (38 bronze badges) 38 38 bronze badges 0 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:7e5c76ec48251fe8,10:1744819861,16:302cdce66f74f50e,8:24418776,274c7e51e3f8289c1b2db99681efd56794ce65fdc35c0e44af236b75dc4d54bf) 8 (This answer is not useful) (70:3:31e,16:24f12270090dfd8e,10:1744819861,16:a27f11745e61a952,8:24418776,056826443b0ac26d4105ba214c23718b0528f345fbbbb38bd4130515b02f158b) Save this answer. (Loading when this answer was accepted…) (/posts/24418776/timeline) Show activity on this post. I think this is gonna help you zip -r new_zip_file directory_name Where "new_zip_file" is the name of the .zip file you want to create and "directory_name" is the folder you want compress in zip. (/a/24418776) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 Follow (70:3:31e,16:a3c3dcde1a3525b7,10:1744819861,16:984224b9a027b1b0,8:24418776,db7bda4f0d28c0d849d590db38372f4635767b5e4217adb74974111623920094) Follow this answer to receive notifications answered (2014-06-25 21:20:09Z) Jun 25, 2014 at 21:20 (/users/3115345/rbrandao) (RBrandao's user avatar) (/users/3115345/rbrandao) RBrandao RBrandao (reputation score) 152 (1 silver badge) 1 1 silver badge (13 bronze badges) 13 13 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:3cd632a9834d6770,10:1744819861,16:78c116d7b8d78cc9,8:48333337,992b92595a4abb3494842f15dd2be509f22fded59b395d515649a1167ddb5d88) 4 (This answer is not useful) (70:3:31e,16:e768ad93dde51f39,10:1744819861,16:a46df4dfff1dd0d2,8:48333337,5334400a33df6bbbba7f4088a423ebf2009e372d0a94009c304ebaeceb76169f) Save this answer. (Loading when this answer was accepted…) (/posts/48333337/timeline) Show activity on this post. Typically one uses tar to create an uncompressed archive and either gzip or bzip2 to compress that archive. The corresponding gunzip and bunzip2 commands can be used to uncompress said archive, or you can just use flags on the tar command to perform the uncompression. If you are referring specifically to the Zip file format, you can simply use the zip and unzip commands. To compress: zip squash.zip file1 file2 file3 or to zip a directory zip -r squash.zip dir1 To uncompress: unzip squash.zip this unzips it in your current working directory. Source :: (https://unix.stackexchange.com/questions/6596/how-do-i-zip-unzip-on-the-unix-command-line) here (/a/48333337) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 Follow (70:3:31e,16:9cc133e172acf7c5,10:1744819861,16:8f773d5e0957e6d0,8:48333337,5b854e5d16cd49060f336349cd194b43942e56ed2c3422e12121571a56f31725) Follow this answer to receive notifications answered (2018-01-19 02:35:15Z) Jan 19, 2018 at 2:35 (/users/6464277/akash-kandpal) (Akash Kandpal's user avatar) (/users/6464277/akash-kandpal) Akash Kandpal Akash Kandpal (reputation score) 3,404 (29 silver badges) 29 29 silver badges (26 bronze badges) 26 26 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:1ab4b7b7bdac4552,10:1744819861,16:c7f41d622573bb67,8:48456372,fce963cdf9ba6db0e16f9ce34b77f0c46c2da800ef6642cf8ae0bc1dbf31e8c1) 4 (This answer is not useful) (70:3:31e,16:86e761edb252f5b4,10:1744819861,16:f9d9b60a55a01751,8:48456372,8ab58a6b4c4060381bd50cae233f7610b28243dfd7d227663eca6cafb5bcaf21) Save this answer. (Loading when this answer was accepted…) (/posts/48456372/timeline) Show activity on this post. This should be quite easy and shortcompressing tar -zcvf filename.tar myflie.sql Decompressing tar -xvzf filename For more interested in knowing usage options z - filter achieving through gzipj - filter achieve through bzip2c - create achieve filev - show the progressx - extract achieve filef - file name cheers (/a/48456372) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/3.0/) (The current license for this post: CC BY-SA 3.0) CC BY-SA 3.0 Follow (70:3:31e,16:dcb66a096de88629,10:1744819861,16:9e913b356059c228,8:48456372,0a8ea38ddf503bceb3fe25de7bef52e75e19c1331fa4fd5bee9b8a7d4ba0b8a5) Follow this answer to receive notifications answered (2018-01-26 05:52:14Z) Jan 26, 2018 at 5:52 (/users/6082637/assy) (Assy's user avatar) (/users/6082637/assy) Assy Assy (reputation score) 301 (2 silver badges) 2 2 silver badges (7 bronze badges) 7 7 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:f8f968b296ff6059,10:1744819861,16:2485249a8ba3da0d,8:24418911,edbb06e7a50861eb931636fdcdc917fba41d119a543ea1ff40d3d570e6ddb716) 3 (This answer is not useful) (70:3:31e,16:a7f57ba7d15ebfb0,10:1744819861,16:1678f6005ad52e56,8:24418911,2d4bbee6331323b087fb9e7b91054f6f83bd789509c681a763c6a7002898f0d3) Save this answer. (Loading when this answer was accepted…) (/posts/24418911/timeline) Show activity on this post. On linux, although it can zip you really should instead be using : to compress tar -jcvf archive_name.tar /path/to/directory_to_compress where archive_name.tar will be the the compressed version of the input dir /path/to/directory_to_compress to decompress tar -xvf archive_name.tar tar is available on Windows 10 you can install it from (https://www.libarchive.org/downloads/) https://www.libarchive.org/downloads/ which will give you bsdtar.exe which I just used to successfully decompress a xxx.tar file created on linux tar on windows (https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/) https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/ (/a/24418911) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 Follow (70:3:31e,16:f9b25b8c22097b4d,10:1744819861,16:d1a0973775b8d319,8:24418911,c2fbb3b7b0e628465f8ed553efeaf01adb80bb661472af04eeb34cd2e55c8a2d) Follow this answer to receive notifications (/posts/24418911/revisions) (show all edits to this post) edited (2024-04-09 13:31:07Z) Apr 9, 2024 at 13:31 answered (2014-06-25 21:29:11Z) Jun 25, 2014 at 21:29 (/users/147175/scott-stensland) (Scott Stensland's user avatar) (/users/147175/scott-stensland) Scott Stensland Scott Stensland (reputation score 28,375) 28.4k (12 gold badges) 12 12 gold badges (98 silver badges) 98 98 silver badges (109 bronze badges) 109 109 bronze badges 2 (number of 'useful comment' votes received) 3 That's not ZIP, you must agree. It's not portable. – (/users/47961/eugene-mayevski-callback) (46,124 reputation) Eugene Mayevski 'Callback Commented (2014-06-26 05:22:53Z, License: CC BY-SA 3.0) Jun 26, 2014 at 5:22 (number of 'useful comment' votes received) 1 Exactly, why else would I be asking how to make a zip? – (/users/1278913/dan) (685 reputation) Dan Commented (2014-06-26 08:21:08Z, License: CC BY-SA 3.0) Jun 26, 2014 at 8:21 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:4025e00b1ba19b4d,10:1744819861,16:9f20f9a2a6a604fd,8:78809231,63fcb8c70ffca717c3124da3533c5e7990fac139a3138a0364c13d3d07241bd0) 2 (This answer is not useful) (70:3:31e,16:286955b489885acd,10:1744819861,16:038ac0389742e315,8:78809231,6819748641bf2a846682973eef95759cb23abef3b1e2c6c5b8d6ec4920bcf5d8) Save this answer. (Loading when this answer was accepted…) (/posts/78809231/timeline) Show activity on this post. Python is installed almost everywhere, so: # create archive python -m zipfile -c my.zip target_file_or_dir # extract from archive python -m zipfile -e my.zip target-dir/ Check (https://docs.python.org/3/library/zipfile.html#command-line-interface) docs (/a/78809231) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 Follow (70:3:31e,16:8d975470bf13eddc,10:1744819861,16:7e6b51b965188b43,8:78809231,67a08cb2fe59a946b7f7710a218c900d82b5b8a513b034e63d0ce4858a11209d) Follow this answer to receive notifications answered (2024-07-29 22:32:56Z) Jul 29, 2024 at 22:32 (/users/19315471/user19315471) (user19315471's user avatar) (/users/19315471/user19315471) user19315471 user19315471 (reputation score) 623 (1 gold badge) 1 1 gold badge (7 silver badges) 7 7 silver badges (17 bronze badges) 17 17 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) (24418651) (false) () (0) Your Answer (True) Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question . Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our (/help/how-to-answer) tips on writing great answers . Draft saved Draft discarded (80823973848d5aac2ae197737f179bc4b30ac67c67491815ce58aee3b012cf60) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f24418651%2fhow-do-i-make-a-zip-file-on-linux%23new-answer) log in Sign up using Google Sign up using Email and Password (false) (false) Submit Post as a guest Name () () Email Required, but never shown () () Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy .(1) Start asking to get answers Find the answer to your question by asking. (/questions/ask) Ask question Explore related questions (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/zip) (show questions tagged 'zip') zip (/questions/tagged/command-line-interface) (show questions tagged 'command-line-interface') command-line-interface See similar questions with these tags. The Overflow Blog (https://stackoverflow.blog/2025/04/15/how-ai-can-prevent-clinician-burnout/?cb=1) How AI can prevent clinician burnout (https://stackoverflow.blog/2025/04/16/wbit-7-exploring-webassembly-with-the-first-so-user-to-get-10k-rep/?cb=1) WBIT #7: Exploring WebAssembly with the first SO user to get 10k rep Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/407927/changes-to-reporting-for-the-status-review-escalation-process?cb=1) Changes to reporting for the [status-review] escalation process (Meta Stack Exchange) (https://meta.stackexchange.com/questions/408236/chat-link-being-added-to-left-navigation-bar?cb=1) Chat link being added to left navigation bar (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/421831/policy-generative-ai-e-g-chatgpt-is-banned?cb=1) Policy: Generative AI (e.g., ChatGPT) is banned (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/433466/a-discussion-about-closed-and-potentially-useful-posts-on-stack-overflow?cb=1) A discussion about closed (and potentially useful) posts on Stack Overflow Related (https://stackoverflow.com/q/2977663?rq=3) (Question score (upvotes - downvotes)) 8 (https://stackoverflow.com/questions/2977663/how-do-i-create-a-zip-file-in-java?rq=3) How do I create a ZIP file in Java? (https://stackoverflow.com/q/3730747?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/3730747/how-to-move-a-file-in-to-zip-uncompressed-with-zip-cmd-tool?rq=3) How to move a file in to zip uncompressed, with zip cmd tool (https://stackoverflow.com/q/8535325?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/8535325/bash-zip-script?rq=3) Bash Zip Script (https://stackoverflow.com/q/16432609?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/16432609/zipping-together-zip-files?rq=3) Zipping together zip files (https://stackoverflow.com/q/26241096?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/26241096/unix-shell-zip-command?rq=3) Unix Shell - Zip command (https://stackoverflow.com/q/26646616?rq=3) (Question score (upvotes - downvotes)) 40 (https://stackoverflow.com/questions/26646616/how-to-create-a-zip-file-using-shell-script?rq=3) How to create a zip file using shell script? (https://stackoverflow.com/q/28744500?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/28744500/compress-files-in-a-directory-in-a-zip-file-with-the-shell?rq=3) Compress files in a directory in a zip file with the shell (https://stackoverflow.com/q/38319682?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/38319682/zip-command-options-on-mac-linux?rq=3) zip command options on mac/linux (https://stackoverflow.com/q/44062627?rq=3) (Question score (upvotes - downvotes)) 9 (https://stackoverflow.com/questions/44062627/zip-folder-in-bash?rq=3) zip folder in bash (https://stackoverflow.com/q/63227507?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/63227507/how-to-zip-contents-of-a-folder-in-linux-command-line?rq=3) How to zip contents of a folder in linux command line (https://stackexchange.com/questions?tab=hot) Hot Network Questions (Space Exploration Stack Exchange) (https://space.stackexchange.com/questions/68245/is-the-centrifuge-still-part-of-astronaut-training) Is the centrifuge still part of astronaut training? (The Workplace Stack Exchange) (https://workplace.stackexchange.com/questions/200736/as-a-manager-in-cybersecurity-how-can-i-help-my-junior-team-members-move-away-f) As a manager in cybersecurity, how can I help my junior team members move away from rote learning? (Aviation Stack Exchange) (https://aviation.stackexchange.com/questions/108390/when-flying-close-or-at-the-coffin-corner-and-you-get-a-tcas-warning-what-do) When Flying Close (or at) the Coffin Corner and you get a TCAS warning, what do you do? (Writing Stack Exchange) (https://writing.stackexchange.com/questions/71201/how-are-magical-spells-created-in-fiction) How are magical spells created in fiction? (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/312185/adjusting-customizing-control-size-in-manipulate) Adjusting/Customizing Control Size in Manipulate[] (Super User) (https://superuser.com/questions/1892272/discord-thinks-i-am-living-in-the-future-why) Discord thinks I am living in the future - why? (Space Exploration Stack Exchange) (https://space.stackexchange.com/questions/68240/skywriting-and-advertising-in-space) Skywriting and advertising in space? (Chess Stack Exchange) (https://chess.stackexchange.com/questions/46891/puzzles-on-chess-com-mate-or-material) Puzzles on Chess.com - mate or material (Unix & Linux Stack Exchange) (https://unix.stackexchange.com/questions/793747/perl-executes-the-code-inside-an-if-block-regardless-of-the-condition-itself) Perl executes the code inside an if-block regardless of the condition itself (English Language Learners Stack Exchange) (https://ell.stackexchange.com/questions/364287/but-even-if-they-had-not-been-arrested-i-would-never-consider-vs-would-never) But even if they had not been arrested, I vs moving to X (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131442/popular-orders-in-a-popular-chain) Popular orders in a popular chain (Cross Validated) (https://stats.stackexchange.com/questions/664135/statistical-analysis-for-2-measures-in-intervention-group-and-1-measure-in-contr) Statistical analysis for 2 measures in intervention group and 1 measure in control group? (Physics Stack Exchange) (https://physics.stackexchange.com/questions/847662/frame-dependence-of-de-broglie-wavelength) Frame dependence of De Broglie wavelength (TeX - LaTeX Stack Exchange) (https://tex.stackexchange.com/questions/740926/bug-huge-page-cannot-be-shipped-out) Bug: huge page cannot be shipped out (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/5056467/question-involving-limits-and-area-of-region) Question involving limits and area of region (Travel Stack Exchange) (https://travel.stackexchange.com/questions/194839/what-is-different-on-vietjet-than-more-expensive-airlines) What is different on VietJet than more expensive airlines? (Home Improvement Stack Exchange) (https://diy.stackexchange.com/questions/316939/how-do-real-electricians-fill-in-unused-bolt-holes-on-metal-box-covers) How do *real electricians* fill in unused bolt holes on metal box covers? (Physics Stack Exchange) (https://physics.stackexchange.com/questions/847676/how-do-nuclear-reactions-undergoing-beta-plus-decay-release-energy) How do nuclear reactions undergoing beta plus decay release energy? (Mi Yodeya) (https://judaism.stackexchange.com/questions/148871/why-is-kohein-not-used-as-a-jewish-given-name-unlike-levi-or-yisrael) Why is "Kohein" Not Used as a Jewish Given Name, Unlike Levi or Yisrael? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91415/what-gives-the-executive-branch-the-power-to-freeze-a-college-s-funding) What gives the executive branch the power to freeze a college’s funding? (MathOverflow) (https://mathoverflow.net/questions/491133/locally-isomorphic-graphs) Locally isomorphic graphs (Bicycles Stack Exchange) (https://bicycles.stackexchange.com/questions/96576/can-i-substitute-gears-from-different-shimano-cranksets) Can I substitute gears from different shimano cranksets? (The Workplace Stack Exchange) (https://workplace.stackexchange.com/questions/200737/how-can-i-professionally-address-repeated-lack-of-detail-in-user-stories-without) How can I professionally address repeated lack of detail in user stories without causing tension in the team? (Stack Overflow) (https://stackoverflow.com/questions/79574787/filter-data-frame-by-list) Filter data.frame by list (/feeds/question/24418651) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/24418651) () () () (https://stackoverflow.com) (https://stackoverflow.com) Stack Overflow (/questions) Questions (/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (/contact) Contact Us Your Privacy Choices (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2025.4.16.25282