英语常用单词/词组笔记

照顾

look after …… well照顾好某人
take good care of ……照顾好某人

让某人做某事

let sb do sth (permission)允许让某人做某事
have sb do sth (permission)允许让某人做某事
make sb do sth (obligation)强迫某人做某事/让某人有义务做某事

独自

alone强调个体上的独自
lonely强调能力上的独自
by self强调能力上的独自
on sb’s own强调能力上的独自

发生

happen sth发生坏事
take place sth只是发生,中性
occur sth发生紧急的事情

[步骤] 系统升级 (从 openSUSE Leap 15.3 升级到 openSUSE Leap 15.4)

步骤一:显示现在的系统版本

# cat /etc/*release*
NAME="openSUSE Leap"
VERSION="15.3"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.3"
PRETTY_NAME="openSUSE Leap 15.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

(注意:确保显示的系统版本是 openSUSE Leap 15.3)

步骤二:准备升级

2.1 确认已使用的软件库

# zypper ls -d
#  | Alias                     | Name                               | Enabled | GPG Check | Refresh | Priority | Type   | URI
---+---------------------------+------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------------------------
1  | repo-non-oss              | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/
2  | repo-oss                  | Main Repository                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.3/repo/oss/
3  | repo-update               | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/oss/
4  | repo-update-non-oss       | Update Repository (Non-Oss)                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/non-oss/
5  | repo-backports-update     | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/backports/
6  | repo-sle-update           | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/sle/


补充:
1) 确保以上软件库已处于 Enabled 状态
2) 手动启动这些软件库的命令如下

# zypper ar -fcg http://download.opensuse.org/distribution/leap/${releasever}/repo/non-oss/ Non-OSS Repository
# zypper ar -fcg http://download.opensuse.org/distribution/leap/${releasever}/repo/oss/ Main Repository
# zypper ar -fcg http://download.opensuse.org/update/leap/${releasever}/oss/ Main Update Repository
# zypper ar -fcg http://download.opensuse.org/update/leap/${releasever}/non-oss/ Update Repository (Non-Oss)
# zypper ar -fcg http://download.opensuse.org/update/leap/${releasever}/backports/ Update repository of openSUSE Backports
# zypper ar -fcg http://download.opensuse.org/update/leap/${releasever}/sle/ Update repository with updates from SUSE Linux Enterprise 15

2.2 刷新已使用的软件库

# zypper ref

(注意:确保刷新成功,否则请检查网络)

2.3 将所有 openSUSE Leap 15.3 软件包更新到最新版本

# zypper -n update

2.4 用 releasever 变量替换所有版本号

# sed -i 's/15.3/${releasever}/g' /etc/zypp/repos.d/*.repo

步骤三:升级系统

3.1 将版本号设置为 15.4 并刷新

# zypper --releasever=15.4 refresh

3.2 提前下载并安装 openSUSE Leap 15.4 所需的软件包

# zypper --releasever=15.4 dup --download-in-advance

3.3 升级系统

# zypper --releasever=15.4 dup

3.4 重启系统

# reboot

步骤四:后续检查

4.1 显示升级后的系统版本

# cat /etc/*release*
NAME="openSUSE Leap"
VERSION="15.4"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.4"
PRETTY_NAME="openSUSE Leap 15.4"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.4"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

4.2 显示升级后已使用的软件库

# zypper ls -d
#  | Alias                     | Name                                                         | Enabled | GPG Check | Refresh | Priority | Type   | URI
---+---------------------------+------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------------------------
1  | repo-non-oss              | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.4/repo/non-oss/
2  | repo-oss                  | Main Repository                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.4/repo/oss/
3  | repo-update               | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.4/oss/
4  | repo-update-non-oss       | Update Repository (Non-Oss)                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.4/non-oss/
5  | repo-backports-update     | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.4/backports/
6  | repo-sle-update           | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.4/sle/

[命令] Linux 命令 script (记录用户的所有操作和操作的输出结果)

正文:

内容一:script 命令的格式

1.1 script 命令的格式

# script <option> <parameter>

1.2 script 命令的选项

1) -a 或者 –append #以追加的方式将记录写入文件
2) -c <command> 或者 –command <command> #运行 script 命令后直接执行 命令,再直接推出 script
3) -e 或者 –return #在 script 命令运行时,显示执行命令的状态返回麻
4) -f 或者 –flush #在 script 命令运行时,只要发生了变化就立刻写入文件
5) –force #写入记录的文件可以是链接
6) -o <size> 或者 –output-limit <size> #限制写入文件的大小, 的单位可以为:KiB (=1024)、KB (=1000)、MiB (10241024)、MB (=10001000)、GiB (=10001000)、TiB (=10001000) 等
7) -q 或者 –quiet #以安静模式运行 script 命令
8) -t[<file>] 或者 –timing[=<file>] #将时间信息输出到标准错误(stderr)或者文件里
9) -V 或者 –version #显示 script 命令的版本
10) -h 或者 –help #显示帮助

内容二:script 命令的使用案例

2.1 进入 script 模式

# script -a -f command.txt

(补充:这里以追加的形式把用户的所有操作和操作的输出结果写入到 command.txt 文件里)

2.2 推出 script 模式

# exit

(补充:此时在进入 script 命令模式后用户的所有操作和操作的输出结果都已写入到 command.txt 文件里)

补充: