环境(6)Linux文件系统二

一:计算机间的数据传输

windows—linux :

                          lrzsz  :需要手动安装 yum  install  lrzsz  -y   ;   rz  将文件从window上传到linux  ; sz文件  将从linux传输到window

                          xftp  较为通用的文件传输方式

Linux—–Linux 

                        scp 元数据地址(source) 目标数据地址(target)

                        scp  apache-tomcat-7.0.61.tar.gz  [email protected]:/opt

                        scp   [email protected]:/opt/apache-tomcat-7.0.61.tar.gz./

                        scp  -r   apache-tomcat-7.0.61  [email protected]:/opt

windows 传给linux 里文件:如果没有xftp的话,就需要我们装一个软件在linux中: yum  install lrzsz -y

 

 装好了。

  lrzsz  :需要手动安装 yum  install  lrzsz  -y   ;

   rz  将文件从window上传到linux  ;    当我们输入rz后就会弹出窗口我们选择我们要上传的文件就可以了

   sz文件  将从linux传输到window

 

 二:Linux—–Linux 

三:查看文件打下

分区信息:  df  -h

指定文件目录大小  : du  -h  –max-depth=1  apache-tomcat-7.0.61

swap  :一个特殊分区,以硬盘代替内存, 当内存使用满的时候,可以将一部分数据写到swap分区

四:文件压缩  一共是俩种包,一种是tar包,另一种是zip包

① tar : 主要针对的文件是   lucky.tar.gz     ]’

解压缩 : tar  -zx(解呀)v(过程)f(文件)lucky.tar.gz

压缩: tar -zc(压缩)f(文件)tomcat.tar.gz(压缩后的名字) apache-tomcat-7.0.61(源文件)

tar – zxf tomcat.tar.gz-C/opt/

      -C指定解压缩的文件目录

②zip 和unzip

安装: yum  install  zip  unzip  -y

压缩 : zip -r  tomcat.zip(这个是起的名字)  apache-tomcat-7.0.61

解压缩 : unzip tomcat.zip