{"id":17,"date":"2008-03-20T14:45:02","date_gmt":"2008-03-20T18:45:02","guid":{"rendered":"http:\/\/hoolihan.net\/blog-tim\/?p=17"},"modified":"2008-03-20T14:50:15","modified_gmt":"2008-03-20T18:50:15","slug":"get-name-of-current-directory","status":"publish","type":"post","link":"http:\/\/hoolihan.net\/blog-tim\/2008\/03\/20\/get-name-of-current-directory\/","title":{"rendered":"Get Name of Current Directory"},"content":{"rendered":"<p>The following gets you the full path&#8230;<\/p>\n<p><code>pwd<\/code><\/p>\n<p>example: \/home\/tim\/my_project<\/p>\n<p>What if you just want my_project?  This comes in handy when writing<br \/>\nbackup scripts for coding directories.<\/p>\n<p><code>pwd | sed 's\/.*\\\/\/\/g'<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following gets you the full path&#8230; pwd example: \/home\/tim\/my_project What if you just want my_project? This comes in handy when writing backup scripts for coding directories. pwd | sed &#8216;s\/.*\\\/\/\/g&#8217;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-os-x"],"_links":{"self":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}