Linux-2024-fall
跳到导航
跳到搜索
Linux 操作系统 (2024秋) 课程主页(李正华老师班级)
课程安排
- Teacher: 李正华
- 助教:蒋浩辰
- QQ群: 412082433
- 2022计算机科学与技术(大三上) 49人
- Linux操作系统(模块1专业选修)
- 上课时间和地点
- 理论课:周二 3-4节 9:55-11:30 博远401
- 实践课:双周周二 1-2节 8:00-9:35 理工楼317
- 没上课的情况记录:
- 成绩分布(暂定):平时xx(课堂考试、考勤)、实验xx、期末xx
自学资料
实验报告(随堂考试)
- 在csteaching上布置、提交、批改作业。外网需要vpn访问。
- 随堂考试,实验课结束时,提交好实验报告。
- 实验报告一定请上传Pdf文件。
- 其他要求,请看上课板书:todo
en.dep文件 文件:En.dev.autotagMIRA.conll.dep.txt
课程笔记
zip加密:zip -e xyz.zip *.txt
- todo:declare -i; awk
Lesson 15(2024.12.24;第17周)
- awk、find、xargs
- 用户管理
- 压缩、解压缩
- 进程管理
- ubuntu下报错,illegal reference to array arr_var_name,那么应该用sudo apt-get install gawk来修复
重要知识:
-size n[ckMGTP]
True if the file's size, rounded up, in 512-byte blocks is n. If n is followed by a c, then the primary is true if the file's size is n bytes (characters). Similarly if
n is followed by a scale indicator then the file's size is compared to n scaled as:
k kilobytes (1024 bytes)
M megabytes (1024 kilobytes)
G gigabytes (1024 megabytes)
T terabytes (1024 gigabytes)
P petabytes (1024 terabytes)
-type t
True if the file is of the specified type. Possible file types are as follows:
b block special
c character special
d directory
f regular file
l symbolic link
p FIFO
s socket
+n for greater than n,
-n for less than n,
n for exactly n.
-cmin n
File's status was last changed n minutes ago.【分钟为单位】
-atime -1h30m 【必须有加减号,注意有些版本的find不支持这个,只以day为单位!】
s second
m minute (60 seconds)
h hour (60 minutes)
d day (24 hours)【默认是天】
w week (7 days)
find ../Downloads -maxdepth 1 -type f -mtime +600 [bar pipeline] xargs ls -l > x
如果搜索到的文件名有空格,如'a b c.txt'
那么ls会看成三个文件(目录),进行处理。没有办法看成一个整体
【wiki不允许用英文的 bar,否则保存时会报错】
find ../Downloads -maxdepth 1 -type f -mtime +600 -exec ls -l '{}' \; > x
是ok的
find ../Downloads -maxdepth 1 -type f -mtime +600 -ok ls -l '{}' + > x
一次性把所有文件作为参数,cmd执行一次
Lesson 14(2024.12.17;第16周)
- 文件系统 part2
- 挂载、卸载
- 修改权限
- 时间戳
- 符号连接、硬链接
Lesson 13(2024.12.10;第15周)
- 文件系统,inode block superblock
- df du
Lesson 12(2024.12.3;第14周)
- shell编程(分支、循环、函数、命令行参数、保存命令结果、输入输出)
Lesson 11(2024.11.26;第13周)
- sed复习
- shell编程(let、运算、数组、unset、环境变量、test)
Lesson 10(2024.11.19;第12周)
- tr、sed
- shell编程 part1
Lesson 9(2024.11.12;第11周)
- 管道、sort、uniq
Lesson 8(2024.11.5 第10周)
- RE
Lesson 7(2024.10.29;第9周)
- vi part2
- 通配符
- 重定向
Lesson 6(2024.10.22;第8周)
- vi使用:各种模式
- TODO: 其他的一些使用,如:r!ls
Lesson 5(2024.10.15;第7周)
- https://linuxize.com/post/bashrc-vs-bash-profile/
- ^D ^C
- bashrc vs. bash_profile
- vi开始
- 随堂考试【为了尽可能公平,以后严格要求:座位、电脑、手机】
Lesson 4(2024.10.8;第6周)
- less的使用
- shell使用技巧
- 文本查看命令:cat head tail
- 文件操作命令:cp mv mkdir rmdir rm
- 命令类型
- shell执行命令时做了哪些工作
- 环境变量PATH
- TODO:alias设置、source
Lesson 3(2024.9.24;第4周)
- man ls
- man man(man的基本使用)
- 随堂考察
Lesson 2(2024.9.10;第2周)
- shell基本使用、shell的概念、父shell、子shell
- 命令语法、ls命令
- 命令行参数、python中sys.argv
- 特殊目录:. ..
- 相对路径、绝对路径、cd命令
Lesson 1(2024.9.3;第1周)
- 课程介绍、个人介绍
- Linux安装
- 图形界面、文字界面
- shell的概念