Course overview + the shell

发布时间 2023-06-24 15:43:21作者: yhish

虚拟机崩了,难受,不能即时玩……勉强试出来了几个Windows的指令,也还是蛮好玩的

但还是记一下linux的

date查看日期

echo打印,后可接$PATH打印所有路径

cd目录跳转

..父目录

.子目录

ls显示文件

ls -l 显示文件的一些信息

mv 重命名 两个参数

cp 复制 两个参数

rm 删除

rmdir 只删空白的文件夹

mkdir 创建文件夹(注意 空格会使它创建两个)

man ls 手册

>  < 输入流输出流

cat 捕捉 例子:

echo hello > hello.txt

cat heallo.txt

hello

cat < hello.txt

hello

cat < hello.txt > hello2.txt

cat hello2.txt

hello

cat < hello.txt >> hello2.txt  (>>意味追加)

cat hello2.txt

hello

hello

 

| 连接输入输出,左的输出转为右的输入,右的输出到终端

sudo 超级管理员权限

cd /sys 进入计算机内核参数

# //run as root

sudo su 将以下命令都变为超级管理员权限(可以在路径中看到改变,例如username变为root,前面的$变为#)

tee 将输入写入文件

xdg-open 打开文件

 

 

 

Windows跳转目录直接输入路径就可以了。而且实测echo也能用