Compression, decompression, shutdown, restart and mount
one。 Compression and decompression
Common compression formats recognized by gz.bz2linux
Common compression and packaging commands for tar.gz.itar.bz2
Compress and pack simultaneously
Tar-zcvf compressed file name source file
Tar-zcvf aa.tar.gz aa
-z recognize .gz format
-c: compression
-v: shows the compression process
-f: specify the compressed package name
Tar-zxvf compressed file names are decompressed and untyped simultaneously
Tar-jcvf compressed file name source file compression and packaging at the same time
Tar-jcvf aa.tar.bz2 aa
Tar-jxvf aa.tar.bz2 unpacking and decompression
Check the unsolved package.
Tar-ztvf aa.tar.gz cannot unlock the package
Tar-jtvf aa.tar.bz2
-t only view, not decompress
Tar-jxvf root.tar.bz2-C / tmp/ specifies the decompression location
two. Shut down and restart command
1) there is no special case for shutdown-h now, use this command
-h shutdown
-r restart
Shutdown-r now
three。 Mount command
Linux all storage devices must be mounted and used, including hard drives
CD mount
/ dev/sda1 first partition of the first scsi hard drive
/ dev/cdrom CD
/ dev/hdc CD centos 5.5
/ dev/sr0 CD centos 6.x
Mount-t file system device description file mount point (empty directory already exists)
Mount-t iso9660 / dev/cdrom / mnt/cdrom
CD unloading
Umount / dev/cdrom
Umount / mnt/cdrom emphasizes that only when you exit the mount directory can you uninstall it.
Fdisk-l
Mount-t vfat / dev/sdb1 / mnt/usb
Sed-n '3p' file name; print the contents of the third line of the file
Sed-n'2, 5p 'file name; print the contents of the file from 2 to 5 lines