Creating and removing · 作成と削除
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · このページには最新のブラウザ(SharedArrayBuffer対応)が必要です。Chrome、Edge、Firefox、Safariを最新バージョンに更新してください。
English
Making things
mkdirmakes a directory;touchmakes an empty file:
- After these, you have a
notesfolder with an emptytodo.txtinside it.
日本語
作成
mkdirはディレクトリを作成し、touchは空のファイルを作成します:
mkdir notes
touch notes/todo.txt
- これらの後、
notesというフォルダの中に空のtodo.txtが存在することになります。
English
Copying and moving
cpcopies a file;mvmoves (or renames) it:
mv old newis also how you rename something — moving it to a new name.
日本語
コピーと移動
cpはファイルコピーを行い、mvは移動(または名前の変更)を行います:
cp hello.txt backup.txt
mv backup.txt notes/backup.txt
mv old newは名前の変更にも使えます —一个新的名前に移動することで実現します。
English
Removing — carefully
rmremoves a file. To remove a folder and everything in it, add-r(recursive):
- ⚠️ There is no recycle bin on the command line.
rmis permanent — always check before you delete.
日本語
削除 — 注意して
rmはファイルを取り除きます。フォルダとその中身すべてを削除するには、-rを追加します(再帰的):
rm backup.txt
rm -r notes
- ⚠️ コマンドラインにはゴミ箱がありません。
rmは永久削除です — 削除前に必ず確認してください。
English
Common mistakes
rmdeletes for good — there is no recycle bin.mkdirmakes a folder;rmdironly removes an empty one.
日本語
よくあるミス
rmは完全に削除され、ゴミ箱はありません。mkdirはフォルダを作成し、rmdirは空のフォルダのみを削除します。
Explore · 探索
Folders and files · フォルダとファイル
mkdir / touch add to the tree; cd moves where you are. · mkdir / touch はツリーに追加; cd は現在の場所を変える。
Make a new folder called notes with mkdir notes. The check then lists the folder to confirm it appeared. · notes という名前の新しいフォルダを mkdir notes で作る。チェックではフォルダがリスト表示され、作成されたことが確認できる。
Make a copy of hello.txt named backup.txt using cp. · hello.txt のコピーを backup.txt という名前で cp で作る。