{"id":1613,"date":"2012-10-18T18:16:00","date_gmt":"2012-10-18T22:16:00","guid":{"rendered":"http:\/\/www.rexfeng.com\/blog\/?p=1613"},"modified":"2012-10-18T18:16:00","modified_gmt":"2012-10-18T22:16:00","slug":"5-essential-terminal-shortcuts","status":"publish","type":"post","link":"https:\/\/www.rexfeng.com\/blog\/2012\/10\/5-essential-terminal-shortcuts\/","title":{"rendered":"5 Essential Terminal Shortcuts"},"content":{"rendered":"<div id=\"attachment_1621\" style=\"width: 550px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1621\" class=\"size-large wp-image-1621\" title=\"terminal\" src=\"http:\/\/www.rexfeng.com\/blog\/wp-content\/uploads\/2012\/10\/terminal-540x324.png\" alt=\"\" width=\"540\" height=\"324\" srcset=\"https:\/\/www.rexfeng.com\/blog\/wp-content\/uploads\/2012\/10\/terminal-540x324.png 540w, https:\/\/www.rexfeng.com\/blog\/wp-content\/uploads\/2012\/10\/terminal-150x90.png 150w, https:\/\/www.rexfeng.com\/blog\/wp-content\/uploads\/2012\/10\/terminal-300x180.png 300w, https:\/\/www.rexfeng.com\/blog\/wp-content\/uploads\/2012\/10\/terminal.png 590w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><p id=\"caption-attachment-1621\" class=\"wp-caption-text\">Terminal screen<\/p><\/div>\n<p>The first time you see the Terminal screen, it&#8217;s very intimidating. &#8220;<em>What am I supposed to do here How do I navigate? What can I type?<\/em>&#8221; Over time, [cci]cd[\/cci]-ing and [cci]ls[\/cci]-ing will become second nature. Using a Command Line Interface (Terminal) is simply more efficient than leaving the comfortable home position to drag the mouse a few inches.<\/p>\n<p>In OS X, Terminal wraps the Bash (Unix shell) application. I&#8217;ve learned some essential Bash shortcuts that will help you save time and be more efficient.<\/p>\n<ol>\n<li>[Tab]<br \/>\nCommand-line completion is amazing. Bash will automatically fill in partially typed commands. If you have a file named &#8220;profile-page.html&#8221; and hit [Tab] while typing out the first few letters, the rest of the file name will likely be auto completed for you.<\/li>\n<li>[cci]ls -a[\/cci]<br \/>\nWhile you probably know about typing [cci]ls[\/cci] in a directory to show all files, typing [cci]ls -a[\/cci] will let Bash show you all files (including the hidden ones) that Finder won&#8217;t show you by default.<\/li>\n<li>[cci]touch [\/cci][file_name]<br \/>\nThe touch command takes in a file_name argument that is the file name created on the spot.<\/li>\n<li>[Cmd+T]<br \/>\nCreate tabs with [Cmd+T] Do you remember the first time you tried Firefox several years ago? Tabs are your friends.<\/li>\n<li>[cci]open [\/cci] [target]<br \/>\nThe open command followed by the folder or file name will let you open up files in their default application.<\/li>\n<\/ol>\n<p>Working out of the Terminal is amazing. If you&#8217;re interested in more power tips, I&#8217;d recommend reading about <a href=\"http:\/\/www.peachpit.com\/articles\/article.aspx?p=31442&amp;seqNum=5\">alias<\/a> and <a href=\"http:\/\/www.sublimetext.com\/docs\/2\/osx_command_line.html\">subl symlink<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first time you see the Terminal screen, it&#8217;s very intimidating. &#8220;What am I supposed to do here How do I navigate? What can I type?&#8221; Over time, [cci]cd[\/cci]-ing and [cci]ls[\/cci]-ing will become second nature. Using a Command Line Interface (Terminal) is simply more efficient than leaving the comfortable home position to drag the mouse [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1029],"tags":[],"class_list":["post-1613","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/comments?post=1613"}],"version-history":[{"count":25,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1613\/revisions"}],"predecessor-version":[{"id":1662,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1613\/revisions\/1662"}],"wp:attachment":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/media?parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/categories?post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/tags?post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}