目录
$ tar -cvf files.tar files.txt # 仅打包,不压缩
$ tar -zcvf files.tar.gz files.txt # 打包后,以 gzip 压缩
$ tar -jcvf files.tar.bz2 files.txt # 打包后,以 bzip2 压缩$ gzip * # 将所有文件压缩成 .gz 文件
$ gzip -l * # 详细显示压缩文件的信息,并不解压
$ gzip -r log.tar # 压缩一个 tar 备份文件,此时压缩文件的扩展名为.tar.gz
$ gzip -rv test/ # 递归的压缩目录$ zip -q -r file.zip /path/dir$ scp file.tar [email protected]:/root/workspace/projects/codes$ tar -ztvf files.tar.gz # 查阅上述 tar 包内有哪些文件
$ tar -zxvf file.tar.gz file.txt # 只将 tar 内的部分文件解压出来
$ tar -zxvf files.tar.gz # 将 tar 包解压缩
$ tar -xvf files.tar # 将 tar 包解压缩$ gzip -dv * # 解压上例中的所有压缩文件,并列出详细的信息
$ gzip -dr test/ # 递归地解压目录$ unzip file.zip # 解压 zip 文件
$ unzip file.zip /path/dir # 在指定目录下解压缩
$ unzip -n file.zip -d /tmp/ # 在指定目录下解压缩
$ unzip -o file.zip -d /tmp/ # 在指定目录下解压缩,如果有相同文件存在则覆盖
$ unzip -v file.zip # 查看压缩文件目录,但不解压$ ps -aux | grep "python"$ kill -9 进程PID$ cd /codes/CES-load_prediction
$ nohup file.sh > logs.log 2>&1 &$ htop# 启动 docker
$ cd /workspace/projects
$ sh run.sh
# 判断 docker 是否启动
$ docker ps$ ssh -p 8848 [email protected]
$ DaMao2024!$ docker stop cesData Parallelization
$ tmux $ tmux ls$ tmux a -t cmd_name:set ff=unix