欢迎光临散文网 会员登陆 & 注册

[MIT]计算机科学课堂中学不到的知识 The Missing Semester

2023-02-27 15:10 作者:racluna  | 我要投稿

$1

06:26 shell prompt

07:53 parameters are separated by space

create "hello world" or hello\ world to enter as a single para

10:25 env var

$PATH: linux/mac,use / to separate, all files lives in the root space(/开头); win use \ to separate, lives in dif disc(开头是不同的盘)

which

12:54 relative path: to where you r right now, let computer find out themselves

pwd: find out where you are

cd: change current working directory

.:current direc

..:parent direc

cd .. : change to the parent direct

cd ./home: change to the home file under current direc

../../../../bin/echo world

ls: navigate through the directory

~: brings you back to home direc

cd -: cd to the previous direct

[cmd] --help: check out the function

19:21 flag(doesn't take in value) & option(takes in value)

20:08 ls -l /filename: longlist format display

第一个字母:direct

后面字母:3个一组,代表后面不同owner的权限(r读w写x执行)

23:10 对于文件夹来说rwx的意义

24:48 mv: change location/ change name (改前,改后)

25:27 cp: [copy file from, paste file to ]

26:05 rm: not recursive -rmf: recursive rmdir: remove the direc only when it's empty

27:05 man: find manual for a function

ctrl+L: clear & go back to the top


29:06 ways to rewire the input stream & output stream

cat: print out the file

30:58 another way to copy a file

  1. cp [old_file] [new_file]
  2. cat < [old_file] > [new_file]

>>:append

34:59 [input stream file] | [output stream file]: 前面的结果作为后面的输入(用来处理文本、图片非常好用)


35:51 root user: can do anything

sudo

#

sudo su

37:33 /sys

42:00 tee: 在文件里写,也在屏幕上打印

42:59 find


45:25 open files

linux: xdg-open

mac:open




[MIT]计算机科学课堂中学不到的知识 The Missing Semester的评论 (共 条)

分享到微博请遵守国家法律