Linux Command TIPS

xiaoxiao2021-03-19  218

RPM Command Common Method Installing a Package # RPM-IVH Upgrade A Pack # RPM -UVH Removes a Package # RPM -E Installation Parameters --force Even if the file overrides other packages is also forced to install - Nodeps if the RPM package installation Relying on other packages, even if other packages are not installed, it is also forced to install. Query if a package is installed # rpm -q get information # rpm -qi listing this package # rpm -ql listing One of the server belongs to which RPM package # rpm -qf can synthesize several parameters together with # rpm -qil list all installed RPM Package # rpm -qa lists a unstormed enterprise Which files contain in the RPM package file? # rpm -qilp

TAR & GZIP The simplest method TAR ZXVF XXXX.TAR.GZTAR JXVF XXXXTAR.BZ2 compresses a set of files to tar.gz suffix. # TAR CVF backup.tar / etc #gzip -q backup.tar or # tar cvfz backup.tar.gz / etc / release a buffet for tar.gz. #gunzip backup.tar.gz #tar xvf backup.tar or # tar xvfz backup.tar.gz Use a command to complete the compression #TAR CVF - / etc / | gzip -qc> backup.tar.gz Complete the release of the release # Gunzip -c backup.tar.gz | TAR XVF - How to unwinder TAR.Z file? # TAR XVFZ backup.tar.z or # uncompress backup.tar.z #TAR XVF backup.tar how to unwinder .tgz file? #gunzip backup.tgz How to compress and decompress the .bz2 package? # bzip2 /etc/smb.conf This will compress file SMB.conf into smb.conf.bz2

#bunzip2 /etc/smb.conf.bz2 This will restore smb.conf.bz2 in the current directory (BZIP2 -D is also the same)

Note: .bz2 compressed format is not very common, you can man bzip2

转载请注明原文地址:https://www.9cbs.com/read-130263.html

New Post(0)