Simple disk operations

A simple operation of the disk
1, disk space Check
DF -H
-H: Human Abbreviation, displays the results to a more readable manner (i.e. with units: for example, M / G, if not this parameter, in the digital display units B )
2, view the current directory of the size of the space occupied
du -SH
-s: recursion whole entire directory size; -h: user-friendly display

--------------------- -------------------------------------------------- ----------

Second, conventional packing compression, decompression
tar
  unpack: tar xvf fileName.tar
  Packing: tar CVF filename.tar DirName
  (Note:! tar is packaged, not compressed)
GZ
  decompression 1: gunzip filename.gz
  extracting 2: gzip -d fileName.gz
  compression: the gzip FileName
the tar.gz tgz and
  decompression: tar zxvf fileName.tar.gz
  compression: the tar zcvf filename.tar.gz DirName
ZIP
  decompression: unzip fileName.zip
  compression: zip fileName.zip DirName
  Compress a directory using -r parameter, -r recursively. Example: $ -R & lt filename.zip DirName ZIP
RAR
  decompression: rar x FileName.rar
  compression: rar a FileName.rar DirName

Guess you like

Origin www.cnblogs.com/lazy-sang/p/11407285.html