{"id":815,"date":"2015-04-14T04:44:59","date_gmt":"2015-04-14T04:44:59","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=815"},"modified":"2015-04-14T05:16:11","modified_gmt":"2015-04-14T05:16:11","slug":"linux-basic-commands","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/linux-basic-commands\/","title":{"rendered":"Linux Basic Commands &#8211; Directory Navigation"},"content":{"rendered":"<p><strong>How folders are organized <\/strong><br \/>\nwhen you enter terminal the default location it takes is the location of the folder of the current user which<br \/>\ncomes under \/home\/mugil(user logged In)<\/p>\n<p><strong>How to Login as a Root User<\/strong><\/p>\n<pre>\r\n>> su\r\nPassword:\r\n<\/pre>\n<p>R<br \/>\n<strong>Logout of Root User<\/strong><\/p>\n<pre>\r\n>> exit\r\n<\/pre>\n<p><strong>Current Working Directory<\/strong><\/p>\n<pre>\r\n>> pwd\r\n<\/pre>\n<p><strong>Navigate Backward<\/strong><\/p>\n<pre>\r\n>> cd ..\r\n>> cd ..\/..\r\n<\/pre>\n<p><strong>Navigate Forward<\/strong><\/p>\n<pre>\r\n>> cd home\/mugil\r\n<\/pre>\n<p><strong>Home Directory<\/strong><\/p>\n<pre>\r\n>> cd ~\r\n<\/pre>\n<p>Equivalent to Microsoft User Directory i.e My Documents<\/p>\n<p><strong>How to reset admin password<\/strong><\/p>\n<pre>\r\n>> sudo passwd\r\n<\/pre>\n<p><strong>How to Find Directory Files info<\/strong><\/p>\n<pre>\r\n>> ls -l\r\n<\/pre>\n<p><strong>Touch- Creates a Time Stamp<\/strong><\/p>\n<pre>\r\n>> touch test.txt\r\n<\/pre>\n<p>If the file does not exist it creates new once else it updates just the time<\/p>\n<p><strong>Make new Directory<\/strong><\/p>\n<pre>\r\n>> mkdir NewFolder\r\n<\/pre>\n<p><strong>Moving  File within folder that exist<\/strong><\/p>\n<pre>\r\n>> mv test.txt NewFolder\/\r\n<\/pre>\n<p><strong>Copying File within folder that exist<\/strong><br \/>\n<em>Copies test.txt to NewFolder<\/em><\/p>\n<pre>\r\n>> cp test.txt NewFolder\/\r\n<\/pre>\n<p><em>Copies test.txt to one folder above<\/em><\/p>\n<pre>\r\n>> cp test.txt ..\r\n<\/pre>\n<p><strong>Deleting File that exist<\/strong><\/p>\n<pre>\r\n>> rm test.txt \r\n<\/pre>\n<p><strong>Deleting File in folder that is not empty<\/strong><br \/>\n<em>-r recursive<\/em><\/p>\n<pre>\r\n>> rm -r NewFolder\/\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How folders are organized when you enter terminal the default location it takes is the location of the folder of the current user which comes under \/home\/mugil(user logged In) How to Login as a Root User >> su Password: R Logout of Root User >> exit Current Working Directory >> pwd Navigate Backward >> cd&hellip; <a href=\"https:\/\/codethataint.com\/blog\/linux-basic-commands\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[148],"tags":[],"class_list":["post-815","post","type-post","status-publish","format-standard","hentry","category-commands"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=815"}],"version-history":[{"count":9,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/815\/revisions"}],"predecessor-version":[{"id":817,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/815\/revisions\/817"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}