{"id":59100,"date":"2023-08-15T15:01:19","date_gmt":"2023-08-15T07:01:19","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59100"},"modified":"2023-08-24T17:12:05","modified_gmt":"2023-08-24T09:12:05","slug":"linux-command-cp","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/","title":{"rendered":"How to Copy Files and Folders in Linux"},"content":{"rendered":"<p>The <code>cp<\/code> command in Linux stands for \u201ccopy.\u201d It is a command-line utility used to copy files and directories from one location to another within the file system. By using the cp command, users can create duplicates of files or directories, preserving the original content.<\/p>\n<p><code>source<\/code> is the file or directory you want to copy, and <code>destination<\/code> is the location where you want to place the copy. Various options can be added to modify the behavior of the copy, such as preserving file attributes or providing verbose output. It\u2019s a fundamental and widely-used command in Linux for managing files and directories.<\/p>\n<p>In this post, we will look at some common ways the <code>cp<\/code> command is used to copy files and folders in Linux.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<pre>cp [options] source destination<\/pre>\n<hr>\n<h3>1. Duplicating a file<\/h3>\n<pre>cp foo.txt bar.txt<\/pre>\n<p>This command will copy the contents of the file <code>foo.txt<\/code> into a file named <code>bar.txt<\/code>.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let\u2019s say you have a file named <code>foo.txt<\/code> with the following content:<\/p>\n<pre>Hello, World!<\/pre>\n<p>If you run the command <code>cp foo.txt bar.txt<\/code>, it will create a new file named <code>bar.txt<\/code> with the exact same content as <code>foo.txt<\/code>:<\/p>\n<pre>Hello, World!<\/pre>\n<p>If <code>bar.txt<\/code> already exists, its content will be overwritten with the content of <code>foo.txt<\/code>. If bar.txt does not exist, it will be created.<\/p>\n<hr>\n<h3>2. Duplicating a directory (and its contents)<\/h3>\n<pre>cp -R foo-folder bar-folder<\/pre>\n<p>The <code>-R<\/code> option stands for \u201crecursive,\u201d and it\u2019s used to copy directories and their contents, including subdirectories.<\/p>\n<p>Here\u2019s what the command <code>cp -R foo-folder bar-folder<\/code> does:<\/p>\n<ul>\n<li><code>cp<\/code>: Invokes the copy command.<\/li>\n<li><code>-R<\/code>: Tells the command to operate recursively, copying all directories and subdirectories.<\/li>\n<li><code>foo-folder<\/code>: The source directory that you want to copy.<\/li>\n<li><code>bar-folder<\/code>: The destination directory where you want to copy the source directory.<\/li>\n<\/ul>\n<p><strong>Example<\/strong><\/p>\n<p>Let\u2019s say you have a directory called <code>foo-folder<\/code> with the following structure:<\/p>\n<pre>\r\nfoo-folder\/\r\n\u251c\u2500\u2500 file1.txt\r\n\u2514\u2500\u2500 subfolder\r\n    \u2514\u2500\u2500 file2.txt\r\n<\/pre>\n<p>And you want to copy this entire directory into another directory called <code>bar-folder<\/code>.<\/p>\n<p>You would run the command:<\/p>\n<pre>cp -R foo-folder bar-folder<\/pre>\n<p>After running this command, the <code>bar-folder<\/code> directory will have the same structure as <code>foo-folder<\/code>:<\/p>\n<pre>\r\nbar-folder\/\r\n\u2514\u2500\u2500 foo-folder\r\n    \u251c\u2500\u2500 file1.txt\r\n    \u2514\u2500\u2500 subfolder\r\n        \u2514\u2500\u2500 file2.txt\r\n<\/pre>\n<p>If <code>bar-folder<\/code> does not exist, it will be created. If it does exist, the foo-folder will be copied into it, preserving the structure of <code>foo-folder<\/code>.<\/p>\n<p><strong>Note:<\/strong> If you want to copy the contents of <code>foo-folder<\/code> directly into <code>bar-folder<\/code> without creating a <code>foo-folder<\/code> inside <code>bar-folder<\/code>, you would need to make sure <code>bar-folder<\/code> exists and then run:<\/p>\n<pre>cp -R foo-folder\/* bar-folder\/<\/pre>\n<hr>\n<h3>3. Show the copying progress<\/h3>\n<pre>cp -v foo.txt bar.txt<\/pre>\n<p>The <code>-v<\/code> option stands for \u201cverbose,\u201d and when used with the <code>cp<\/code> command, it provides detailed information about the operations being performed.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Suppose you have a file named <code>foo.txt<\/code> in your current directory, and you want to create a copy of this file in the same directory with a new name bar.txt. You can use the following command:<\/p>\n<pre>cp -v foo.txt bar.txt<\/pre>\n<p>If the operation is successful, the command will output a message like this:<\/p>\n<pre>'foo.txt' -&gt; 'bar.txt'<\/pre>\n<p>This message confirms that the file <code>foo.txt<\/code> has been copied to bar.txt.<\/p>\n<hr>\n<h3>4. Confirmation to overwrite a file<\/h3>\n<pre>cp -i foo.txt bar.txt<\/pre>\n<p>The <code>-i<\/code> stands for \"interactive\". When you use this option, the system will prompt you before overwriting any files. This is useful if you want to avoid accidentally overwriting existing files.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let\u2019s say you have a file named <code>foo.txt<\/code> in your current directory and you want to create a copy of it named <code>bar.tx<\/code>t in the same directory. However, you\u2019re not sure if a file named bar.txt already exists, and you don\u2019t want to overwrite it without being warned.<\/p>\n<p>You would use the command:<\/p>\n<pre>\r\ncp -i foo.txt bar.txt\r\n<\/pre>\n<p>If <code>bar.txt<\/code> already exists, the system will prompt you with a message like:<\/p>\n<pre>\r\ncp: overwrite 'bar.txt'?\r\n<\/pre>\n<p>You can then choose to overwrite it by typing <code>y<\/code> (yes) or avoid overwriting by typing <code>n<\/code> (no).<\/p>\n<p>If <code>bar.txt<\/code> doesn\u2019t exist, the command will simply create a copy of <code>foo.txt<\/code> named <code>bar.txt<\/code> without any prompt.<\/p>\n<hr>\n<h3>5. Copying multiple files to a directory<\/h3>\n<pre>cp foo.txt bar.txt baz<\/pre>\n<p>This command will duplicate a copy of <code>foo.txt<\/code> and <code>bar.txt<\/code> in, into the <code>baz<\/code> directory. The <code>baz<\/code> directory must first exist in order for command to work.<\/p>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>Learn how to duplicate files and directories like a pro using Linux cp command.<\/p>\n","protected":false},"author":9,"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":[888,3316],"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.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Copy Files and Folders in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"Learn how to duplicate files and directories like a pro using Linux cp command.\" \/>\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\/linux-command-cp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Copy Files and Folders in Linux\" \/>\n<meta property=\"og:description\" content=\"Learn how to duplicate files and directories like a pro using Linux cp command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\" \/>\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-08-15T07:01:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-24T09:12:05+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\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=\"Hongkiat.com\" \/>\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\\\/linux-command-cp\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to Copy Files and Folders in Linux\",\"datePublished\":\"2023-08-15T07:01:19+00:00\",\"dateModified\":\"2023-08-24T09:12:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/\"},\"wordCount\":599,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/\",\"name\":\"How to Copy Files and Folders in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-08-15T07:01:19+00:00\",\"dateModified\":\"2023-08-24T09:12:05+00:00\",\"description\":\"Learn how to duplicate files and directories like a pro using Linux cp command.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-cp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Copy Files and Folders in Linux\"}]},{\"@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\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Copy Files and Folders in Linux - Hongkiat","description":"Learn how to duplicate files and directories like a pro using Linux cp command.","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\/linux-command-cp\/","og_locale":"en_US","og_type":"article","og_title":"How to Copy Files and Folders in Linux","og_description":"Learn how to duplicate files and directories like a pro using Linux cp command.","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-08-15T07:01:19+00:00","article_modified_time":"2023-08-24T09:12:05+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to Copy Files and Folders in Linux","datePublished":"2023-08-15T07:01:19+00:00","dateModified":"2023-08-24T09:12:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/"},"wordCount":599,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/","name":"How to Copy Files and Folders in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-08-15T07:01:19+00:00","dateModified":"2023-08-24T09:12:05+00:00","description":"Learn how to duplicate files and directories like a pro using Linux cp command.","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Copy Files and Folders in Linux"}]},{"@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\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fne","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59100","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59100"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59100\/revisions"}],"predecessor-version":[{"id":68907,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59100\/revisions\/68907"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59100"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}