0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

📁 ディレクトリ操作コマンド一覧

Posted at

📁 ディレクトリ操作コマンド一覧
コマンド 説明 例
pwd 現在のディレクトリを表示 pwd → /home/xs337632/tree-1.8.0
ls ファイル・ディレクトリ一覧を表示 ls -l(詳細表示)
cd ディレクトリを移動 cd ~/Documents
mkdir 新しいディレクトリを作成 mkdir new_folder
rmdir 空のディレクトリを削除 rmdir old_folder
rm -r ディレクトリと中身を削除 rm -r folder_to_delete
cp -r ディレクトリをコピー cp -r src_folder dest_folder
mv ディレクトリの移動・名前変更 mv old_name new_name
tree ディレクトリ構造をツリー表示 tree -L 2
find ファイルやディレクトリを検索 find . -name "*.txt"
🧠 よく使う組み合わせ
cd .. → 一つ上の階層へ移動

ls -a → 隠しファイルも表示

mkdir -p dir1/dir2 → ネストされたディレクトリを一気に作成

rm -rf folder → 強制削除(⚠️注意!)

🔍 便利な補足
tabキー → ファイル名やディレクトリ名の補完

Ctrl + r → 過去のコマンド履歴から検索

history → 実行したコマンド一覧を見る

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?