macOS常用命令整理,此文记录了平常使用终端的一些基本命令,使用命令行进行操作还是很有成就感的,建议使用Mac的用户可以学习一下一些基本的命令。
man
1
2
3
4$man command-name
eg:
$man ls
$man -k #search all commandpwd cd ls
1
2
3$ls -la
$pwd
$cdcat less which file
1
2
3
4
5
6
7
8
9$cat #check test file
$cat a.txt >> b.txt
$less #high grade than cat
#spacekey->paging
#/ search
#Q quit
#v go to vi editor
$whicch command-name
$file filename #check filefind & mdfind
edit file and directory
1
2
3
4$mkdir -p a/b/c/d/e
$cp -R <file> a/b/ file --> b/
$mv -R <file> a/b/ file --> b/
$rm -R directory/filevi and nano
su and sudo
open .
control + c
history
control + l == clear