{"id":66392,"date":"2023-04-12T18:01:17","date_gmt":"2023-04-12T10:01:17","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=66392"},"modified":"2023-04-20T00:58:02","modified_gmt":"2023-04-19T16:58:02","slug":"batch-zip-files-mac","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/","title":{"rendered":"How to Batch Compress Files on Mac (Automate with a Bash Script)"},"content":{"rendered":"<p>If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive Utility built into Mac OS can be used to zip files in batches, it can still be a manual process. However, with a little bit of scripting knowledge, you can automate the process of batch-zipping files using a Bash script.<\/p>\n<p>In this article, we will guide you through the process of creating a Bash script that will allow you to zip files in batches of any number you choose, on your Mac. Whether you are working with hundreds or thousands of files, this script will help you save time and avoid the monotony of zipping files manually. By the end of this tutorial, you will have a fully-functional Bash script that you can use to batch zip files in any quantity you need, with just a few simple commands.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg\" width=\"2005\" height=\"1128\" alt=\"batch zip files in mac\"><\/figure>\n<p>For example, let\u2019s say you have 100 files in a particular folder. You can use this script to compress the files into groups of 10, resulting in 10 compressed files in total. Alternatively, you can compress the files into groups of 5, resulting in 20 compressed files in total, and so on.<\/p>\n<pre>\r\n#!\/bin\/bash\r\n\r\n# Set the directory path to the folder containing the files to be compressed\r\nDIR_PATH=\"\/path\/to\/folder\"\r\n\r\n# Set the name prefix of the output archive files\r\nARCHIVE_PREFIX=\"archive\"\r\n\r\n# Set the maximum number of files per batch\r\nMAX_FILES=20\r\n\r\n# Change directory to the specified path\r\ncd \"$DIR_PATH\"\r\n\r\n# Get a list of all files in the directory\r\nfiles=( * )\r\n\r\n# Calculate the number of batches of files\r\nnum_batches=$(( (${#files[@]} + $MAX_FILES - 1) \/ $MAX_FILES ))\r\n\r\n# Loop through each batch of files\r\nfor (( i=0; i&lt;$num_batches; i++ )); do\r\n    # Set the start and end indices of the batch\r\n    start=$(( $i * $MAX_FILES ))\r\n    end=$(( ($i + 1) * $MAX_FILES - 1 ))\r\n    \r\n    # Check if the end index exceeds the number of files\r\n    if (( $end &gt;= ${#files[@]} )); then\r\n        end=$(( ${#files[@]} - 1 ))\r\n    fi\r\n    \r\n    # Create a compressed archive file for the batch of files\r\n    archive_name=\"${ARCHIVE_PREFIX}_${i}.tar.gz\"\r\n    tar -cvzf \"$archive_name\" \"${files[@]:$start:$MAX_FILES}\"\r\ndone\r\n<\/pre>\n<p><a href=\"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-in-batches.sh.zip\" class=\"su-button su-button-style-flat\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:0px\" target=\"__blank\" rel=\"noopener nofollow\"><span style=\"color:#FFFFFF;padding:7px 20px;font-size:16px;line-height:24px;border-color:#6cadf4;border-radius:0px;text-shadow:none\"><i class=\"sui sui-download\" style=\"font-size:16px;color:#fff\"><\/i>  Download script. <\/span><\/a><\/p>\n<h2>What This Script Does?<\/h2>\n<p>The above script is a bash script that compresses multiple files into batch archives.<\/p>\n<p>It first sets the path to the folder (<code>DIR_PATH=\"<strong>\/path\/to\/folder<\/strong>\"<\/code>) containing the files to be compressed, the name prefix of the output archive files (<code>ARCHIVE_PREFIX=\"<strong>archive<\/strong>\"<\/code>), and the maximum number of files per batch (<code>MAX_FILES=<strong>20<\/strong><\/code>).<\/p>\n<p>It then changes the current directory to the specified path and gets a list of all files in that directory. The script then calculates the number of batches of files and loops through each batch.<\/p>\n<p>For each batch, it sets the start and end indices of the batch, checks if the end index exceeds the number of files, and then creates a compressed archive file for the batch of files using the \u2018tar\u2019 command.<\/p>\n<p>The resulting compressed archives are named using the prefix specified and numbered sequentially.<\/p>\n<h2>How to Use the Script?<\/h2>\n<h3>Step 1.<\/h3>\n<p>To batch zip files on your Mac, first <strong>create a new folder<\/strong> and <strong>place all the files you want to compress inside that folder<\/strong>.<\/p>\n<p>For example, you could create a folder called <strong>\u2018zipme\u2019<\/strong> on your Desktop and place all the relevant files inside that folder. Once you have done this, you can find the path to the folder by navigating to it in Finder and then right-clicking and selecting \u2018<strong>Get Info<\/strong>\u2018.<\/p>\n<p>Alternatively, you can use the <code>pwd<\/code> command in Terminal to display the current directory and then append the folder name to the end of the path. And in our case, path to <strong>zipme\/<\/strong> is: <code>\/Users\/hongkiat\/Desktop\/zipme<\/code>, so we will do the following:<\/p>\n<p>edit:<\/p>\n<pre>\r\nDIR_PATH=\"\/path\/to\/folder\"\r\n<\/pre>\n<p>to becoming:<\/p>\n<pre>\r\nDIR_PATH=\"\/Users\/hongkiat\/Desktop\/zipme\"\r\n<\/pre>\n<h3>Step 2.<\/h3>\n<p><strong>Copy and paste the code above<\/strong> into a new file on your Mac using a text editor like TextEdit or Atom. Save the file with a <em><strong>.sh<\/strong><\/em> extension (e.g. <em>batch_zip.sh<\/em>) and <strong>make it executable<\/strong> by running the following command in Terminal:<\/p>\n<pre>\r\nchmod +x \/path\/to\/batch_zip.sh\r\n<\/pre>\n<h3>Step 3.<\/h3>\n<p>Then, to run the script, open Terminal and navigate to the directory where the script is saved. Type the following command and press <strong>Enter<\/strong>:<\/p>\n<pre>\r\n.\/batch_zip.sh\r\n<\/pre>\n<p><strong>Note:<\/strong> If running <code>.\/batch_zip.sh<\/code> doesn\u2019t work, try using <code>sudo .\/batch_zip.sh<\/code> instead. Keep in mind that \u201csudo\u201d requires authorization by entering the password for the current Mac username.<\/p>\n<p>Once executed,  all the files inside the specified folder will be compressed into batches of up to 20 files each, and an archive file will be created for each batch with the specified prefix and an incremental number.<\/p>","protected":false},"excerpt":{"rendered":"<p>If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive Utility built into Mac OS can be used to zip files in batches, it can still be a manual process. However, with a little bit of scripting knowledge,&hellip;<\/p>\n","protected":false},"author":629,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[3933],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Batch Compress Files on Mac (Automate with a Bash Script) - Hongkiat<\/title>\n<meta name=\"description\" content=\"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Batch Compress Files on Mac (Automate with a Bash Script)\" \/>\n<meta property=\"og:description\" content=\"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-12T10:01:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-19T16:58:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg\" \/>\n<meta name=\"author\" content=\"Eoin Wiley\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eoin Wiley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/\"},\"author\":{\"name\":\"Eoin Wiley\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8072818f761549daecd3c5c4c0bfc8\"},\"headline\":\"How to Batch Compress Files on Mac (Automate with a Bash Script)\",\"datePublished\":\"2023-04-12T10:01:17+00:00\",\"dateModified\":\"2023-04-19T16:58:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/\"},\"wordCount\":633,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/batch-zip-files-mac\\\/zip-files-in-batches.jpg\",\"keywords\":[\"macOS\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/\",\"name\":\"How to Batch Compress Files on Mac (Automate with a Bash Script) - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/batch-zip-files-mac\\\/zip-files-in-batches.jpg\",\"datePublished\":\"2023-04-12T10:01:17+00:00\",\"dateModified\":\"2023-04-19T16:58:02+00:00\",\"description\":\"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/batch-zip-files-mac\\\/zip-files-in-batches.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/batch-zip-files-mac\\\/zip-files-in-batches.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/batch-zip-files-mac\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Batch Compress Files on Mac (Automate with a Bash Script)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7b8072818f761549daecd3c5c4c0bfc8\",\"name\":\"Eoin Wiley\",\"description\":\"Eoin is an experienced web developer and also a writer for Hongkiat.com. He is a skilled problem-solver with a deep understanding of various programming languages and frameworks.\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/eoinwiley\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Batch Compress Files on Mac (Automate with a Bash Script) - Hongkiat","description":"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/","og_locale":"en_US","og_type":"article","og_title":"How to Batch Compress Files on Mac (Automate with a Bash Script)","og_description":"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive","og_url":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-04-12T10:01:17+00:00","article_modified_time":"2023-04-19T16:58:02+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg","type":"","width":"","height":""}],"author":"Eoin Wiley","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Eoin Wiley","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/"},"author":{"name":"Eoin Wiley","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7b8072818f761549daecd3c5c4c0bfc8"},"headline":"How to Batch Compress Files on Mac (Automate with a Bash Script)","datePublished":"2023-04-12T10:01:17+00:00","dateModified":"2023-04-19T16:58:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/"},"wordCount":633,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg","keywords":["macOS"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/","url":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/","name":"How to Batch Compress Files on Mac (Automate with a Bash Script) - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg","datePublished":"2023-04-12T10:01:17+00:00","dateModified":"2023-04-19T16:58:02+00:00","description":"If you frequently need to zip large numbers of files on your Mac, you may have found the process to be time-consuming and repetitive. While the Archive","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/batch-zip-files-mac\/zip-files-in-batches.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/batch-zip-files-mac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Batch Compress Files on Mac (Automate with a Bash Script)"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7b8072818f761549daecd3c5c4c0bfc8","name":"Eoin Wiley","description":"Eoin is an experienced web developer and also a writer for Hongkiat.com. He is a skilled problem-solver with a deep understanding of various programming languages and frameworks.","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/eoinwiley\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-hgQ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/66392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/629"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=66392"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/66392\/revisions"}],"predecessor-version":[{"id":66624,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/66392\/revisions\/66624"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=66392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=66392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=66392"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=66392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}