{"id":12,"date":"2011-05-19T21:21:49","date_gmt":"2011-05-19T20:21:49","guid":{"rendered":"http:\/\/www.phillips321.co.uk\/?p=12"},"modified":"2011-07-14T11:26:35","modified_gmt":"2011-07-14T10:26:35","slug":"archives","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2011\/05\/19\/archives\/","title":{"rendered":"Archives &#8211; Quick commands"},"content":{"rendered":"<p>This zips the directory and names it xyz.zip in<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">zip<\/span> <span class=\"re5\">-r<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.zip <span class=\"sy0\">\/<\/span>location<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>directory<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This unzips the archive<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">unzip<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.zip<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This tars the directory and names it xyz.tar in \/home\/user\/<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">tar<\/span> <span class=\"re5\">-cvf<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.tar <span class=\"sy0\">\/<\/span>location<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>directory<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This untars the archive<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">tar<\/span> <span class=\"re5\">-xvf<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.tar <span class=\"re5\">-C<\/span> <span class=\"sy0\">\/<\/span>location<span class=\"sy0\">\/<\/span>to<span class=\"sy0\">\/<\/span>extract<span class=\"sy0\">\/<\/span>to<span class=\"sy0\">\/<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This tar.gzs the directory and names it xyz.tar.gz in \/home\/user\/<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">tar<\/span> <span class=\"re5\">-zcvf<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.tar.gz <span class=\"sy0\">\/<\/span>location<span class=\"sy0\">\/<\/span>of<span class=\"sy0\">\/<\/span>directory<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This untars the archive<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">tar<\/span> <span class=\"re5\">-zxvf<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>user<span class=\"sy0\">\/<\/span>xyz.tar.gz <span class=\"re5\">-C<\/span> <span class=\"sy0\">\/<\/span>location<span class=\"sy0\">\/<\/span>to<span class=\"sy0\">\/<\/span>extract<span class=\"sy0\">\/<\/span>to<span class=\"sy0\">\/<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This zips the directory and names it xyz.zip in 1zip -r \/home\/user\/xyz.zip \/location\/of\/directory This unzips the archive 1unzip \/home\/user\/xyz.zip This tars the directory and names it xyz.tar in \/home\/user\/ 1tar -cvf \/home\/user\/xyz.tar \/location\/of\/directory This untars the archive 1tar -xvf \/home\/user\/xyz.tar -C \/location\/to\/extract\/to\/ This tar.gzs the directory and names it xyz.tar.gz in \/home\/user\/ 1tar -zcvf \/home\/user\/xyz.tar.gz [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,3],"tags":[11,10,5,13,15,14,12],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/12"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":3,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":201,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/12\/revisions\/201"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}