Good programmers cloud computing learning route and share files compressed package

Good programmers cloud computing learning route and share files compressed package is recommended for directory

Demo: Copy the unpacked file to the remote host
[root @ Yangs ~] # du -SH / etc
39M / etc
[root @ Yangs ~] # Time scp -r / etc [email protected]: / tmp // will / etc directory ...

=== packing, compression ===
[Yangs the root @ ~] # -czf etc1.tar.gz the tar / etc // - Z call gzip: tar removeing non-error
[root @ yangs ~] # tar -cjf etc2.tar .bz2 / etc // - j call bzip2
[root @ Yangs ~] # tar -cJf etc3.tar.xz / etc // - J calls the xz
[root @ Yangs ~] # LL -h etc *
-rw-R- -r-- 1 root root 8.7M. 3 00:08 etc1.tar.gz dated 12 is.
-rw-R & lt -. r-- the root the root of 7.5M. 3. 1 00:08 etc2.tar.bz2 dated 12 is
-RW- r -. r-- 1 root root 4.8M. 3 dated 12 00:09 etc3.tar.xz

=== decompression unpack ===
[Yangs the root @ ~] # sys.tar.xz the tar -tf
[Yangs the root @ ~] # the tar -xzvf etc1.tar.gz
[Yangs the root @ ~] # the tar -xvf without specifying etc1.tar.gz // Extract tool, tar automatically determines
[root @ yangs ~] # tar -xvf etc2.tar.bz2 -C / tmp // - C // tmp to redirect the directory
[root @ yangs ~] # tar xf etc3.tar.xz! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Remember automatically look like this

file can be viewed
== extract the ZIP
[root @ Yangs ~] # the unzip xxx.zip


压缩打包
gzip bzip2
[root@localhost tmp]# dd if=/dev/zero of=/tmp/data bs=100M count=2
in file out file block size count
[root@localhost tmp]# du -sh data -s 总共 -h 最大单位
[root@localhost tmp]# gzip data
[root@localhost tmp]# gunzip data.gz
[root@localhost tmp]# bzip2 data
[root@localhost tmp]# bunzip2 data.bz2

tar
[root @ localhost tmp] # tar -cvf boot.tar / the Boot / create -c -f -v display process file
[root @ localhost tmp] # tar -tvf boot.tar -t see
[root @ localhost tmp] # tar -rvf boot.tar /root/install.log -r additional package
[root @ localhost tmp] # tar -xvf boot.tar

[root @ localhost tmp] # tar -cvf /home/boot.tar / boot / packet specified storage path
[root @ localhost tmp] # tar -xvf /tmp/boot.tar -C / home / decompression specified directory

调用gzip压缩
[root@localhost tmp]# tar -zcvf boot.tar.gz /boot/
[root@localhost tmp]# tar -ztvf boot.tar.gz
[root@localhost tmp]# tar -zxvf boot.tar.gz

调用bzip2压缩
[root@localhost tmp]# tar -jcvf boot.tar.bz2 /boot/
[root@localhost tmp]# tar -jtvf boot.tar.bz2
[root@localhost tmp]# tar -jxvf boot.tar.bz2

[root @ localhost the Packages] # RPM -ivh Tree-1.5.3-2.el6.x86_64.rpm
-i -v installation process -h display shows the percentage
[root @ localhost Packages] # rpm -q tree -q retrieval
[root @localhost Packages] # rpm -qa | grep httpd retrieve all the software
[root @ localhost Packages] # rpm -ql all listed httpd httpd file location
[root @ localhost Packages] # rpm -ql httpd | cut -d \ / -f 2 | uniq
[root @ localhost packages Standard package] # -qi Tree RPM package lists the information
[root @ localhost packages] # rpm -qd httpd see the software documentation
[root @ localhost packages] # rpm -qc httpd view the configuration file
[root @ localhost packages] # rpm -qf /etc/man.config by a corresponding package file query
[root @ localhost packages] # rpm -qf which mountfind the corresponding software command
[root @ localhost packages] # rpm -e tree unloading
[root @ localhost packages ] # rpm -ivh httpd-2.2.15-26.el6.x86_64.rpm --force force install

未按装
[root@localhost Packages]# rpm -qpi tree-1.5.3-2.el6.x86_64.rpm
[root@localhost Packages]# rpm -qpl tree-1.5.3-2.el6.x86_64.rpm

解决依赖关系
[root@localhost Packages]# rpm -ivh httpd-devel-2.2.15-26.el6.x86_64.rpm
warning: httpd-devel-2.2.15-26.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
apr-devel is needed by httpd-devel-2.2.15-26.el6.x86_64
apr-util-devel is needed by httpd-devel-2.2.15-26.el6.x86_64

[root@localhost Packages]# rpm -ivh apr-devel-1.3.9-5.el6_2.x86_64.rpm
warning: apr-devel-1.3.9-5.el6_2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:apr-devel ########################################### [100%]

[root@localhost Packages]# rpm -ivh apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm
warning: apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
expat-devel is needed by apr-util-devel-1.3.9-3.el6_0.1.x86_64

[root@localhost Packages]# rpm -ivh expat-devel-2.0.1-11.el6_2.x86_64.rpm
warning: expat-devel-2.0.1-11.el6_2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:expat-devel ########################################### [100%]

[root@localhost Packages]# rpm -ivh apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm
warning: apr-util-devel-1.3.9-3.el6_0.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:apr-util-devel ########################################### [100%]

[root@localhost Packages]# rpm -ivh httpd-devel-2.2.15-26.el6.x86_64.rpm
warning: httpd-devel-2.2.15-26.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:httpd-devel ########################################### [100%]

[Root @ localhost Packages] # rpm -e apr-devel --nodeps not detect unloading dependencies

yum using the library
1. [the root @ localhost mnt] # mkdir / yum
[the root @ localhost mnt] # -o Loop /var/ftp/rhel-server-6.4-x86_64-dvd.iso Mount -t ISO9660 / yum /
2 . [root @ localhost mnt] # cd /etc/yum.repos.d/
[root @ localhost yum.repos.d] # Touch yum.repo
[root @ localhost yum.repos.d] # vim yum.repo
[RHEL6 .4] ------------------------ library name
name = rhel6.4 server ------------- description
baseurl = file: /// yum ------------- path
gpgcheck = 0 ---------------------- check whether the key
enabled = 1 ----------------------- opened or closed

Testing
[root @ localhost yum.repos.d] # yum clean all yum Clear cache
[root @ localhost yum.repos.d] # yum makecache establish yum cache
[root @ localhost yum.repos.d] # yum install httpd-devel installation
[root @ localhost yum.repos.d] # -Y yum the install the httpd-devel
[root @ localhost yum.repos.d] # yum rEINSTALL -Y reinstall the httpd-devel
[root @ localhost yum.repos.d] # yum remove apr-devel package removed

onal Development" "Development tools"

[root@localhost software]# chmod +x RealPlayer\&reg\;\ 11\ for\ Linux\ RealPlayer11GOLD.bin
[root@localhost software]# ./RealPlayer\&reg\;\ 11\ for\ Linux\ RealPlayer11GOLD.bin

[root@localhost software]# realplay

Source Package-3.5.10.tar.bz2 lftp
[@ localhost lftp the root-3.5.10] # rpm -e lftp lftp unloading rpm package
[root @ localhost software] # tar -jxvf lftp-3.5.10.tar.bz2 -C / usr / local / src /
before compiling detection and configuration
[root @ localhost lftp-3.5.10] # ./configure --prefix = / usr / local / lftp
compiler
[root @ localhost lftp-3.5.10] # make
installation
[root @ localhost lftp-3.5.10] # make install
test
[root @ localhost lftp-3.5.10] # / usr / local / lftp / bin / lftp 172.16.110.1

[root@localhost lftp-3.5.10]# vim /etc/bashrc
PATH=/usr/local/lftp/bin:$PATH
export PATH

[root@localhost lftp-3.5.10]# lftp 172.16.110.1
lftp 172.16.110.1:/> ls
lftp 172.16.110.1:/> get biji.txt

Guess you like

Origin blog.51cto.com/14479068/2440313