theshell.ch/bonus2/res/test.html
bevilj 2b3e9fa689 Initial bonus 2 implementation
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@153 a672b425-5310-4d7a-af5c-997e18724b81
2018-11-12 18:16:45 +00:00

60 lines
1.3 KiB
HTML

---
layout: page
category-title: Basic commands
category-page: basic
tags: directory change navigate
author: Alessandro Marinelli
title: cd
previous-page: pages/cmd/basic/open.html
next-page: pages/cmd/basic/ls.html
---
<!--
Copyright (c) 2018. Bevilacqua Joey
-->
<p>
The <code>cd</code> command is used to change the working directory<br>
The name stands for <i>Change Directory</i>.<br>
The default cd command syntax is:
<pre>
cd [flags] [path]
</pre>
Where [flags] are the cd flags, read below for more info,and [path] is the
path (absolute or relative), of the directory which we want to make as working directory.<br><br>
<h3>Change the working directory</h3>
Let's see how to use the command <code>cd</code> in order to change the working directory
<pre>
pwd
~
cd Desktop/multimedia
pwd
~/Desktop/multimedia
</pre>
As you can see, we changed the working directory from ~ (which stands for HOME),
to "multimedia". Now our Shell will work on the directory "multimedia"
until a new cd will occour.<br>
<b>Notice:</b> If you want to move to a directory which is not contained in the
current working directory, you <u>MUST</u> use the <a href="foo.html">absolute path</a>.
<h1>Header 1</h1>
<h2>Header 2</h2>
<h4>Header 4</h4>
<ul>
<li>A</li>
<li>B: Hello there</li>
<li>C</li>
<li>D</li>
</ul>
</p>