您的位置:首页 > 运维架构 > Linux

Command Line in Mac/Linux

2016-03-19 21:45 477 查看
读写代码、注意细节、发现差异

坚持每天练习是一件非常重要的事。

pwd: print working directory

hostname: my computer’s network name

// mkdir -p will make an entire path even if all the directories don’t exist.

mkdir: make directory

cd:change directory

// ls something

// “/” like ls something/ will make sure the directory is exist or get an error.

ls:list directory

// wrong with Directory not empty in Mac, try with “rm -rf”

// be careful when running recursive remove on files.

rmdir :remove directory

rm:remove file

//

pushed:push directory

popd:pop directory

touch: make empty files

// cp ~/MyDocument ~/Desktop/MyDocument

// cp -r something newthing

cp:copy a file or directory

mv:move a file or directory

less:page through a file

cat:print the whole file

xargs:execute arguments

find:find files

grep:find things inside files

man:read a manual page

apropos:find what man page is appropriate

env:look at your environment

echo:print some arguments

export:export/set a new environment variable

exit:exit the shell

sudo:DANGER! become super user root DANGER!

From Command line crash course

http://learnpythonthehardway.org/book/appendixa.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  command