27
25

More than 5 years have passed since last update.

MacとWindowsのコマンド対比表

Last updated at Posted at 2017-05-13

仕事で手順書を作る際、MacとWindows両方のコマンドを掲載することがあるので、メモです。
オプションにはよく使うものを指定しています。

よく使うコマンド対比表

Mac Windows memo
現在地のディレクトリとファイルを表示 ls -la dir [Mac]-laで詳細をリスト表示
ファイルやディレクトリを移動 mv [from] [to] move [from] [to]
ディレクトリ名を変更 mv [old] [new] move [old] [new] 移動と同じ
ファイル名を変更 mv [old] [new] ren [old] [new] [Mac]移動と同じ
ディレクトリをコピー cp -R [from] [to] xcopy /e [from] [to] [Mac]-R[Win]/eで、ディレクトリを再帰的にコピー
ファイルをコピー cp -p [from] [to] copy [from] [to] [Mac]-pで、権限やタイムスタンプを含めてコピー
ディレクトリを作成 mkdir [dir] mkdir [dir]
ファイルを作成 touch [file] copy nul [file]
空のディレクトリを削除 rmdir [dir] rmdir [dir]
ディレクトリを再帰的に削除 rm -Rf [dir] rmdir /S [dir]
ファイルを削除 rm [file] del [file]
パーミッション変更 chmod -R [auth] [target] cacls [target] /G [auth]
ディレクトリにシンボリックリンクを貼る ln -s [dir] [link_name] mklink /D [link_name] [dir] MacとWinで、実体とリンク名が逆順なので注意
ファイルにシンボリックリンクを貼る ln -s [file] [link_name] mklink [link_name] [file] [Mac]ディレクトリと同じ
ディレクトリのシンボリックリンクを削除 unlink [link_name] rmdir [link_name]
ファイルのシンボリックリンクを削除 unlink [link_name] del [link_name] [Mac]ディレクトリと同じ

よくお世話になるIT Proさんのコマンド一覧

27
25
0

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
27
25