|
31.
|
|
|
The <command>~</command> character represents the current user's home directory. As seen above, <command>cd ~</command> is equivalent to <command>cd /home/username/</command>. However, when running a command as root (using <command>sudo</command>, for example), <command>~</command> points instead to <filename class="directory">/root</filename>. When running a command with <command>sudo</command>, the full path to your home directory must be given.
|
|
|
|
字元 <command>~</command> 表示目前使用者的「家目錄」。就像你在前面所看到的,使用 <command>cd ~</command> 命令就跟使用 <command>cd /home/username/</command> 的效果是一樣的。但是以 root 身分執行命令 (輸入<command>sudo</command>),<command>~</command> 目錄將會指到 <filename class="directory">/root</filename> (這是 root 的「家目錄」。當執行 <command>sudo</command> 命令後,若想要正確對應到使用者的「家目錄」的話,就必須使用您「家目錄」的完整路徑。
|
|
Translated and reviewed by
fetag
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:100(para)
|
|
32.
|
|
|
To navigate up one directory level, type: <screen>cd ..</screen>
|
|
|
|
輸入﹕<screen>cd ..</screen>,以變換工作目錄至上一層目錄。
|
|
Translated by
Albert
|
|
Reviewed by
hialan
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:111(para)
|
|
33.
|
|
|
To navigate to the previous directory (or back), type: <screen>cd -</screen>
|
|
|
|
輸入: <screen>cd -</screen>,以變換(或回到)先前的目錄。
|
|
Translated and reviewed by
hialan
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:117(para)
|
|
34.
|
|
|
To navigate through multiple levels of directories at once, specify the full directory path that you want to go to. For example, type: <screen>cd /var/www</screen> to go directly to the <filename class="directory">/www</filename> subdirectory of <filename class="directory">/var/</filename>. As another example, type: <screen>cd ~/Desktop</screen> to move you to the <filename class="directory">Desktop</filename> subdirectory inside your home directory.
|
|
|
|
要切換到有多層的目錄路徑中,可以直接指定完整的路徑。舉例來說:輸入 <screen>cd /var/www</screen> 就能直接切換到 <filename class="directory">/var/</filename> 的子目錄 <filename class="directory">/www</filename> 下。再舉一個例子:輸入 <screen>cd ~/Desktop</screen> 將會切換到您「家目錄」路徑下的 <filename class="directory">Desktop</filename> 子目錄。
|
|
Translated and reviewed by
fetag
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:124(para)
|
|
35.
|
|
|
pwd
|
|
|
|
pwd
|
|
Translated and reviewed by
hialan
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:141(title)
|
|
36.
|
|
|
<application>GNOME Terminal</application> also displays this information in the title bar of its window.
|
|
|
|
<application>GNOME Terminal</application>也會在它的視窗標題列上顯示這項資訊。
|
|
Translated and reviewed by
fetag
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:151(para)
|
|
37.
|
|
|
The <command>pwd</command> command outputs which directory you are currently located in (<acronym>pwd</acronym> stands for <quote>print working directory</quote>). For example, typing <screen>pwd</screen> in the <filename class="directory">Desktop</filename> directory, will show <computeroutput>/home/username/Desktop</computeroutput>. <placeholder-1/>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:142(para)
|
|
38.
|
|
|
ls
|
|
|
|
ls
|
|
Translated and reviewed by
hialan
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:160(title)
|
|
39.
|
|
|
The <command>ls</command> command outputs a list of the files in the current directory. For example, typing <screen>ls ~</screen> will show you the files that are in your home directory.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:161(para)
|
|
40.
|
|
|
Used with the <command>-l</command> options, <command>ls</command> outputs various other information alongside the filename, such as the current permissions on the file, and the file's owner.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:167(para)
|