1.RPM Pack
RPM Packages-(Fedora, Redhat and similar systems)
RPM-IVH package.rpm Installing an RPM package
RPM-IVH--nodeeps package.rpm Install an RPM package and ignore dependency warnings
Rpm-u package.rpm Update a RPM package without changing its configuration file
Rpm-f package.rpm update one to determine which RPM package is installed
Rpm-e package_name.rpm Delete an RPM package
RPM-QA display all installed RPM packages in the system
Rpm-qa | grep httpd shows all RPM packages with the words "httpd" in their names
Rpm-qi Package_name get special information for an installed package
RPM-QG "System environment/daemons" shows the RPM package for a component
RPM-QL Package_name displays a list of files provided by an already installed RPM package
RPM-QC Package_name Displays a list of configuration files provided by an already installed RPM package
Rpm-q package_name--whatrequires shows a list of dependencies that exist with a RPM package
Rpm-q package_name--whatprovides shows the volume of a RPM package
Rpm-q package_name--scripts Show scripts executed during installation/removal L
Rpm-q package_name--changelog shows the revision history of a RPM package
rpm-qf/etc/httpd/conf/httpd.conf confirm which RPM package is provided for the given file
RPM-QP package.rpm-l displays a list of files provided by a RPM package that has not been installed
RPM--import/media/cdrom/rpm-gpg-key Import Public key digital certificate
RPM--checksig package.rpm confirming the integrity of a RPM package
RPM-QA Gpg-pubkey confirm the integrity of all RPM packages that have been installed
Rpm-v package_name Check file size, license, type, owner, group, MD5 check, and last modified time
Rpm-va Check all installed RPM packages in the system-use with care
RPM-VP package.rpm confirm that an RPM package is not installed
Rpm2cpio package.rpm | Cpio--extract--make-directories *bin* Run executable from an RPM package
rpm-ivh/usr/src/redhat/rpms/' arch '/package.rpm install a built-in package from a RPM source
Rpmbuild--rebuild package_name.src.rpm Build a RPM package from one RPM source
2. Backup
Dump-0aj-f/tmp/home0.bak/home make a full backup of the '/home ' directory
Dump-1aj-f/tmp/home0.bak/home make an interactive backup of the '/home ' directory
Restore-if/tmp/home0.bak Restoring an interactive backup
Rsync-rogpav--delete/home/tmp sync on both sides of the directory
Rsync-rogpav-e ssh--delete/home ip_address:/tmp via SSH channel rsync
RSYNC-AZ-E SSH--delete ip_addr:/home/public/home/local synchronizes a remote directory to a local directory via SSH and compression
RSYNC-AZ-E ssh--delete/home/local ip_addr:/home/public synchronizing the local directory to the remote directory via SSH and compression
DD bs=1m If=/dev/hda | gzip | SSH [email protected]_addr ' dd of=hda.gz ' to perform a backup of the local disk on the remote host via SSH
DD IF=/DEV/SDA of=/tmp/file1 Backup disk contents to a file
Tar-puf Backup.tar/home/user performs an interactive backup operation on the '/home/user ' directory
(cd/tmp/local/&& tar C.) | ssh-c [email protected]_addr ' cd/home/share/&& tar x-p ' copy a directory content from the remote directory via SSH
(Tar c/home) | ssh-c [email protected]_addr ' cd/home/backup-home && tar x-p ' copy a local directory from the remote directory via SSH
Tar CF-. | (cd/tmp/backup; tar xf-) copy a directory locally to another location, preserving the original permissions and links
Find/home/user1-name ' *.txt ' | Xargs Cp-av--target-directory=/home/backup/--parents Find and copy all files ending with '. txt ' from a directory to another directory
Find/var/log-name ' *.log ' | Tar CV--files-from=-| bzip2 > log.tar.bz2 Find all files that end with '. Log ' and make a bzip package
DD If=/dev/hda of=/dev/fd0 bs=512 count=1 do an action to copy the contents of the MBR (Master Boot Record) to a floppy disk
DD if=/dev/fd0 of=/dev/hda bs=512 count=1 recover MBR content from a backup that has been saved to a floppy disk
3. View Files
Cat File1 Viewing the contents of a file starting from the first byte
TAC File1 To reverse view the contents of a file from the last line
More File1 View the contents of a long file
Less file1 is similar to the ' more ' command, but it allows a reverse operation in the same way as a forward operation in a file
Head-2 File1 View the first two lines of a file
Tail-2 File1 View the last two lines of a file
Tail-f/var/log/messages Real-time view of content that is added to a file
4. Initializing a file system
MKFS/DEV/HDA1 creating a file system in the HDA1 partition
MKE2FS/DEV/HDA1 creating a Linux ext2 file system in the HDA1 partition
Mke2fs-j/dev/hda1 Create a Linux ext3 (journaled) file system in the HDA1 partition
Mkfs-t vfat 32-f/dev/hda1 Create a FAT32 file system
Fdformat-n/dev/fd0 formatting a floppy disk
Mkswap/dev/hda3 creating a swap file system
5. Disk space
DF-H displays a list of the partitions that are already mounted
LS-LSR |more arranging files and directories in size
Du-sh dir1 estimate directory ' Dir1 ' already used disk space '
Du-sk * | SORT-RN display the size of files and directories in terms of capacity size
Rpm-q-a--qf '%10{size}t%{name}n ' | SORT-K1,1N the space used by the installed RPM package, based on size (Fedora, Redhat class System)
Dpkg-query-w-f= ' ${installed-size;10}t${package}n ' | SORT-K1,1N Displays the space used by the installed Deb package based on size (Ubuntu, Debian System)
6. Packaging and compressing files
BUNZIP2 file1.bz2 Extract a file called ' file1.bz2 '
bzip2 file1 compress a file called ' File1 '
Gunzip file1.gz Extract a file called ' file1.gz '
gzip File1 compress a file called ' File1 '
gzip-9 file1 Maximum Compression
RAR a File1.rar test_file create a package called ' File1.rar '
RAR a file1.rar file1 file2 dir1 simultaneously compresses ' file1 ', ' file2 ' and directory ' Dir1 '
rar x File1.rar decompression rar Package
Unrar x File1.rar decompression rar Package
TAR-CVF Archive.tar File1 Create a non-compressed tarball
TAR-CVF Archive.tar file1 file2 dir1 Create a file containing ' file1 ', ' file2 ' and ' Dir1 '
TAR-TF Archive.tar Display the contents of a package
TAR-XVF Archive.tar Release a package
TAR-XVF ARCHIVE.TAR-C/TMP releases the compressed package into the/tmp directory
TAR-CVFJ archive.tar.bz2 Dir1 Create a compressed package in BZIP2 format
TAR-XVFJ archive.tar.bz2 extract a compressed package in BZIP2 format
TAR-CVFZ archive.tar.gz Dir1 Create a zipped package in gzip format
TAR-XVFZ archive.tar.gz Unzip a compressed package in gzip format
Zip file1.zip file1 Create a zip-format compression Package
Zip-r file1.zip file1 file2 Dir1 compresses several files and directories into a zip-format package at the same time
Unzip File1.zip unzip a zip-format tarball
Linux Partial instructions