linux知识

1. 打包 解包  tar原理

    -c   打包

    -x   解包

    -f   必须要

    -C   指定解包位置

    -v   输出信息

    //将多个文件打包

    tar -cvf 打包之后的名称  要打包的文件(可以是多个用空格隔开)

    tar -cvf student.tar student02.txt student03.txt

    //解包到指定目录

    tar -xvf 要解包的名称 -C 指定目录

    tar -xvf student.tar -C /student

    //将多个文件打包并压缩

    tar -zcvf student.tar.gz student02.txt student03.txt

    //解压缩包到指定目录

    tar -zxvf student.tar.gz -C /studenttar

2. which 系统命令   //查找系统自带的命令所在的路径

    案例:which reboot   //查找结果:/sbin/reboot

               which poweroff   //查找结果:/sbin/poweroff

    

    

原文地址:https://www.cnblogs.com/yezihan/p/12381713.html