tar :
linux 处理 归档文件的命令
归档文件:
普通文件:1.log 1m
归档文件:1.log.tar 1m
压缩文件:1.log.tar.gz 0.9m
1.普通 =》压缩 归档文件
1.log =》1.log.tar.gz
tar -zcvf xxx.tar.gz file...
-cf => 创建一个新归档 + 使用归档文件
z => 压缩 gz
v =》详细地列出处理的文件
eg:
[root@sygy10 ~]# tar -zcvf dir.tar.gz dir2 dir4 jdk-8u212-linux-x64.tar.gz
2.解压
tar -zxvf xxx.tar.gz
-xf => 解压 +使用归档文件
z => 压缩 gz
v =》详细地列出处理的文件
百度 、谷歌 、 加一个功能 =》 github 码云 flinkcdc =》 maxwell 源码 =》 flink antrl4 sql
shell :
1.什么是shell ? 脚本语言 python
1.一个编程的语言
2.可以执行的文件
3.文件内容 linux命令组成的
1.shell语法入门
1.入门
1.文件 xxx.sh 结尾
2.第一行 #!/bin/bash
1.编写脚本
vim wc.sh
2.得有执行权限【不一定】
1.不给文件权限
sh xxx.sh
[root@sygy10 shell]# sh ./wc.sh
word count
[root@sygy10 shell]# cat wc.sh
#!/bin/bash
echo "word count"
2.给文件 执行权限
[root@sygy10 shell]# chmod 744 ./wc.sh
[root@sygy10 shell]# ./wc.sh
word count
[root@sygy10 shell]# sh ./wc.sh
word count
补充:
1.给权限
[root@sygy10 shell]# chmod u+x ./wc.sh
[root@sygy10 shell]# ./wc.sh
word count
[root@sygy10 shell]# ~/shell/wc.sh
word count
[root@sygy10 shell]# sh ~/shell/wc.sh
word count
2. debug
1.[root@sygy10 shell]# sh -x ./wc.sh
2.