{"id":1155,"date":"2013-12-06T11:16:54","date_gmt":"2013-12-06T16:16:54","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=1155"},"modified":"2013-12-06T11:16:54","modified_gmt":"2013-12-06T16:16:54","slug":"linux-copy-changed-files","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2013\/12\/linux-copy-changed-files\/","title":{"rendered":"Linux Copy Changed Files"},"content":{"rendered":"<p>I had a CentOS box that needed to backup files to another NAS system.<\/p>\n<p>So I ran the following:<br \/>\n<code>cp -rufT \/source\/dir\/ \/mnt\/nas\/dest\/dir\/<\/code><br \/>\nEverything copied without a hitch.  I then edited one of the files and ran the copy command again.  I was greeted with:<\/p>\n<blockquote><p>cp: overwrite &#8216;\/mnt\/nas\/dest\/dir\/file&#8217;?<\/p><\/blockquote>\n<p>I forgot that CentOS, among other major providers, has an alias for the &#8216;cp&#8217; command when running as root.<\/p>\n<p><code>nano \/root\/.bashrc<\/code><br \/>\nComment out the cp line<br \/>\nRerun the copy command<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had a CentOS box that needed to backup files to another NAS system. So I ran the following: cp -rufT \/source\/dir\/ \/mnt\/nas\/dest\/dir\/ Everything copied without a hitch. I then edited one of the files and ran the copy command again. I was greeted with: cp: overwrite &#8216;\/mnt\/nas\/dest\/dir\/file&#8217;? I forgot that CentOS, among other major &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2013\/12\/linux-copy-changed-files\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Linux Copy Changed Files<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1155","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=1155"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1155\/revisions"}],"predecessor-version":[{"id":1156,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1155\/revisions\/1156"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}