{"id":155,"date":"2017-11-08T23:49:33","date_gmt":"2017-11-09T07:49:33","guid":{"rendered":"http:\/\/courses.haigarmen.com\/intd320\/?page_id=155"},"modified":"2018-04-03T20:18:40","modified_gmt":"2018-04-04T04:18:40","slug":"command-line-reference","status":"publish","type":"page","link":"https:\/\/courses.haigarmen.com\/intd320\/resources\/command-line-reference\/","title":{"rendered":"Command Line Reference"},"content":{"rendered":"<h3>Navigating<\/h3>\n<p>To list the files in the working directory, use the ls command.<\/p>\n<pre>ls<\/pre>\n<p>To change directories (cd) from the working directory<\/p>\n<pre>cd \"directory name\"<\/pre>\n<h3>File Managment<\/h3>\n<p>The rm command removes (deletes) files and directories.<\/p>\n<pre>rm \"file name\"<\/pre>\n<pre>rm -r \"file directory\"<\/pre>\n<h3>System Information<\/h3>\n<p>To output information about operating system:<\/p>\n<pre>cat \/etc\/os-release<\/pre>\n<p>This results in the following output on my Raspberry Pi<\/p>\n<pre>PRETTY_NAME=\"Raspbian GNU\/Linux 8 (jessie)\"\r\nNAME=\"Raspbian GNU\/Linux\"\r\nVERSION_ID=\"8\"\r\nVERSION=\"8 (jessie)\"\r\nID=raspbian\r\nID_LIKE=debian\r\nHOME_URL=\"http:\/\/www.raspbian.org\/\"\r\nSUPPORT_URL=\"http:\/\/www.raspbian.org\/RaspbianForums\"\r\nBUG_REPORT_URL=\"http:\/\/www.raspbian.org\/RaspbianBugs\"<\/pre>\n<h3>More System Information<\/h3>\n<pre>cat \/proc\/cpuinfo \/\/ Processor info\r\ncat \/proc\/version \/\/ Linux version\r\nvcgencmd measure_temp \/\/ CPU temperature<\/pre>\n<h3>Networking<\/h3>\n<pre>ifconfig wlan0\r\n\r\n<\/pre>\n<h3>copy files to &amp; from rpi<\/h3>\n<p>one way is to use\u00a0<code>scp<\/code>\u00a0(secure copy) in your laptop terminal.<br \/>\nto copy a file from your laptop desktop to rpi desktop directory type:<br \/>\n<code>scp ~\/Desktop\/myfile.pd pi@192.168.1.52:Desktop<\/code><\/p>\n<p>to copy another file from your rpi home directory to your laptop home directory type:<br \/>\n<code>scp pi@192.168.1.52:testsines.pd ~<\/code><\/p>\n<p>to copy a whole folder add the recursive flag\u00a0<code>-r<\/code>. for example to move a folder from your laptop documents folder to your rpi home directory type:<\/p>\n<p><code>scp -r ~\/Documents\/soundfiles pi@192.168.1.52:<\/code><\/p>\n<h3>Other Useful Commands<\/h3>\n<pre>ls              #list files\r\ndf -h           #disk free\r\nfree -h         #ram memory\r\ntop             #cpu usage (quit with 'q')\r\nlsusb           #list usb devices\r\naplay -l        #list available soundcards\r\nexit            #leave ssh\r\nsudo halt -p    #turn off - wait for 10 blinks\r\nsudo reboot     #restart\r\nsudo pkill pd   #force quit on some program\r\nls \/dev\/tty*    #see if \/dev\/ttyUSB0 is there\r\nlsusb           #to display a list of attached devices<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Navigating To list the files in the working directory, use the ls command. ls To change directories (cd) from the working directory cd &#8220;directory name&#8221; File Managment The rm command removes (deletes) files and directories. rm &#8220;file name&#8221; rm -r &#8220;file directory&#8221; System Information To output information about operating system: cat \/etc\/os-release This results in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":12,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-155","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/pages\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":15,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/pages\/155\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/pages\/155\/revisions\/247"}],"up":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/pages\/12"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/media?parent=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}