{"id":8817,"date":"2024-05-02T18:55:28","date_gmt":"2024-05-02T18:55:28","guid":{"rendered":"https:\/\/sites.la.utexas.edu\/kb\/?p=8817"},"modified":"2024-05-02T18:58:04","modified_gmt":"2024-05-02T18:58:04","slug":"using-your-terminal-101","status":"publish","type":"post","link":"http:\/\/sites.la.utexas.edu\/kb\/2024\/05\/02\/using-your-terminal-101\/","title":{"rendered":"Using your mac terminal 101"},"content":{"rendered":"\n<p>As a web-developer, utilising your terminal becomes crucial as you do the following: <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install Packages <\/li>\n\n\n\n<li>Configure &amp; run scripts <\/li>\n\n\n\n<li>Access a file quickly <\/li>\n\n\n\n<li>Make changes to a file <\/li>\n\n\n\n<li>Integrate the github in the terminal <\/li>\n<\/ol>\n\n\n\n<p>Manipulating the terminal is a very useful skill that will serve you well in the long term as a developer. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Let&#8217;s learn some basics:<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>How to Clear the terminal\n<ul class=\"wp-block-list\">\n<li>type CMD + K or clear + enter<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to access a certain folder \n<ul class=\"wp-block-list\">\n<li>cd = change directory <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to list the contents of a certain folder\n<ul class=\"wp-block-list\">\n<li>ls : list item <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to exit a directory to go back to previous folder \n<ul class=\"wp-block-list\">\n<li>cd ..<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to find out which directory we are at\n<ul class=\"wp-block-list\">\n<li>pwd<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to delete files\n<ul class=\"wp-block-list\">\n<li>rm filename<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to create a file\n<ul class=\"wp-block-list\">\n<li>touch filename.txt<\/li>\n\n\n\n<li>you can create other types of files if you want too!<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to download files from a given link with the cURL command\n<ul class=\"wp-block-list\">\n<li>The term &#8220;cURL&#8221; stands for &#8220;Client URL,&#8221; referring to the command-line tool and library for transferring data with URLs. cURL is widely used for transferring data to or from a server, supporting various protocols such as HTTP, HTTPS, FTP, FTPS, SCP, SFTP, LDAP, TFTP, and many others. It&#8217;s a versatile tool commonly used in scripting, testing, and debugging network-related tasks.\n<ul class=\"wp-block-list\">\n<li>copy the url of the file you want to download<\/li>\n\n\n\n<li>change directory to desktop cd desktop<\/li>\n\n\n\n<li>make new directory: mkdir curl\/any file name<\/li>\n\n\n\n<li>change into the directory we just created: cd curl<\/li>\n\n\n\n<li>ls to see what\u2019s in there (you\u2019re expecting nothing here)<\/li>\n\n\n\n<li>curl &lt;insert url you copied in step 1&gt;<\/li>\n\n\n\n<li>then, in the same line put -o (small o) Intro_To_ Computing (file name you\u2019d like) if you want to keep the file as is, then see step 11<\/li>\n\n\n\n<li>type ls to see if that\u2019s there<\/li>\n\n\n\n<li>press nano filename<\/li>\n\n\n\n<li>you can see that on the terminal<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Naming Conventions for cURL: You can also control how you want your files to be named when you are downloading the files given the URL\n<ul class=\"wp-block-list\">\n<li>curl -O (capital O) to keep the original file name<\/li>\n\n\n\n<li>Note: Keep no spaces in your file name, if not you\u2019re gonna mess up the file when it\u2019s downloading!<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>How to download multiple files if each of their url&#8217;s are specified in a txt file.\n<ul class=\"wp-block-list\">\n<li>I know that this seems like a very specific problem to solve, but it is solvable because it was the foundation of Project Kiowa Calendar <\/li>\n\n\n\n<li>So, if you ever find yourself in a situation where you have to download multiple files from a txt file which has the url&#8217;s of the files you want to download. Simply use this command. \n<ul class=\"wp-block-list\">\n<li>extract all the URL\u2019s of the files you want to download and put it into a txt file<\/li>\n\n\n\n<li><strong>wget -i filename.txt<\/strong> (the command to be run in your terminal)<\/li>\n\n\n\n<li>Make sure that the file exists in the same directory as you are on 2<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts: <\/h2>\n\n\n\n<p>Being familiar with the terminal can improve your development process and enhance your toolkit as a web developer. Google &amp; Stack Overflow are your best friends when you run into problems. While the list of basic functions is not exhaustive, make sure you explore different terminal commands and practice them. <\/p>\n\n\n\n<p>Please note that these commands work for mac only!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a web-developer, utilising your terminal becomes crucial as you do the following: Manipulating the terminal is a very useful skill that will serve you well in the long term as a developer. Let&#8217;s learn some basics: Final Thoughts: Being &hellip; <a href=\"http:\/\/sites.la.utexas.edu\/kb\/2024\/05\/02\/using-your-terminal-101\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":775,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[200714],"tags":[],"class_list":["post-8817","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/8817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/users\/775"}],"replies":[{"embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/comments?post=8817"}],"version-history":[{"count":4,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/8817\/revisions"}],"predecessor-version":[{"id":8821,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/8817\/revisions\/8821"}],"wp:attachment":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/media?parent=8817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/categories?post=8817"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/tags?post=8817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}