|
30.
|
|
|
cp
|
|
|
|
cp
|
|
Translated and reviewed by
Jun Sumida
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:191(title)
|
|
31.
|
|
|
The <command>cp</command> command will make a copy of a file for you (<acronym>cp</acronym> stands simply for "copy"). For example, type: <screen>cp file foo</screen> to make a exact copy of <filename>file</filename> and name it <filename>foo</filename>, but the file <filename>file</filename> will still be there.
|
|
|
|
<command>cp</command>コマンドはファイルのコピーを作成します(<acronym>cp</acronym>は"copy"の略)。たとえば、<screen>cp file foo</screen>と入力すると、 ファイル <filename>file</filename> のコピーを作成して <filename>foo</filename>という名前をつけます。ファイル <filename>file</filename> に変更はありません。
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:214(para)
|
|
32.
|
|
|
mv
|
|
|
|
mv
|
|
Translated and reviewed by
Jun Sumida
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:202(title)
|
|
33.
|
|
|
<command>mv</command>: The <command>mv</command> command will move a file to a different location or will rename a file (<acronym>mv</acronym> stands simply for "move"). Examples:
|
|
|
|
<command>mv</command>: <command>mv</command>コマンドはファイルを他の場所に移動するか、ファイルの名前を変更します(<acronym>mv</acronym>は"move"の略)。たとえば、
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:227(para)
|
|
34.
|
|
|
To rename a file named <filename>file</filename> to <filename>foo</filename>, type: <screen>mv file foo</screen>.
|
|
|
|
<filename>file</filename>という名前のファイルを <filename>foo</filename>という名前に変更するには、<screen>mv file foo</screen>と入力します。
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:236(para)
|
|
35.
|
|
|
To move the file <filename>foo</filename> to your <filename class="directory">Desktop</filename>, type: <screen>mv foo ~/Desktop</screen>. This will move foo but will not rename it. You must specify a new file name to rename a file.
|
|
|
|
<filename>foo</filename> というファイルを <filename class="directory">デスクトップ</filename>に移動するには、<screen>mv foo ~/デスクトップ</screen>と入力します。foo というファイルは移動しますが、名前は変わりません。ファイル名を変更するには新しいファイル名を指定する必要があります。
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:242(para)
|
|
36.
|
|
|
If you are using <command>mv</command> with <command>sudo</command> you will not be able to use the <emphasis role="strong">~</emphasis> shortcut, but will have to use the full pathnames to your files. This is because when you are working as root, <emphasis role="strong">~</emphasis> will refer to the root account's home directory, not your own.
|
|
|
|
<command>sudo</command>と<command>mv</command>を併用する場合、<emphasis role="strong">~</emphasis>ショートカットを使えなくなり、代わりにファイルへのフルパス(full pathnames)を使用しなくてはなりません。というのも、<emphasis role="strong">~</emphasis>ショートカットは、rootとして作業する時、(自分の"ユーザー"アカウントの)ホームディレクトリではなく、当然rootアカウントのホームディレクトリを示すからです。
|
|
Translated and reviewed by
Jun Sumida
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:250(para)
|
|
37.
|
|
|
rm
|
|
|
|
rm
|
|
Translated and reviewed by
Jun Sumida
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:216(title)
|
|
38.
|
|
|
The <command>rm</command> will remove or delete a file in your directory (<acronym>rm</acronym> stands simply for "remove"). It will not work on directories which have files in them. To remove directories, you can use <command>rm -r</command>. The <emphasis>r</emphasis> stands for <emphasis>recursive</emphasis>. For example: <screen>rm -r foo</screen> will remove the directory named foo and all of its contents.
|
|
|
|
<command>rm</command> はディレクトリにあるファイルを削除します(<acronym>rm</acronym> は "remove"の略)。ファイルが保存されているディレクトリを削除することはできません。ディレクトリを削除するには、<command>rm -r</command>を使用します。 <emphasis>r</emphasis> は再帰的(<emphasis>recursive</emphasis>)という意味です。 <screen>rm -r foo</screen>はfooという名前のディレクトリとその中のすべての内容を削除します。
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:263(para)
|
|
39.
|
|
|
Using <command>rm -r</command> will delete a complete directory and everything in it without further questions, so be careful with this command.
|
|
|
|
<command>rm -r</command>を使用すると、確認を行わずにディレクトリとその内容を完全に削除します。このコマンドは注意して使用してください。
|
|
Translated and reviewed by
CMasami
|
|
|
|
Located in
basic-commands/C/basic-commands.xml:273(para)
|