When managing centos servers, you often perform some common operations on files. In addition to ftp, it is also essential to know the necessary file operation commands under ssh, the following are some common file operation commands: file operation: ls #### view files in the directory #### ls-F #### view files in the directory ##### ls-l ### display files and directories details #### ls-a #### show hidden files #### ls * [0-9] * ### display the file name and directory name containing numbers #### rm go.tar deleted successfully deleting the go.tar file #### find mt. cgi #### find the file name as mt. cgi File #### df? H #### view the remaining disk space #### find/-name xxx-print ### search for xxx files #### compression and decompression: tar xvf wordpress.tar #### decompress a tar file #### tar-tvf myfile.tar #### view the files contained in the tar file ### tar cf toole.tar tool into another example to package the toolcatalog as toole.tar file #### tar cfz xwyme.tar.gz tool variable is almost 10 MB #### tar jcvf/var/bak/www.tar.bz2/var/www/#### create the .tar.bz2 file, high compression rate #### tar xjf www.tar.bz2 unzip the tar.bz2 format #### gzip-d ge.tar.gz unzip file #### unzip phpbb.zip unzip files are still a little troublesome ### bunzip2 file1.bz2 #### decompress a file named 'file1.bz2' #### bzip2 file1 #### compress a file named 'file1' #### gunzip file1.gz #### decompress a file named 'file1.gz '#### gzip file1 #### compress a file named 'file1' #### gzip-9 file1 ### maximum compression #### rar a file1.rar test_file #### create a package named 'file1.rar '### rar a file1.rar file1 file2 dir1 ### simultaneously compress 'file1 ′, 'file2' and the Directory 'dir1' #### rar x file1.rar #### decompress the rar package #### unrar x file1.rar #### decompress the 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' file #### tar-tf archive.tar #### display the content in a package #### tar-xvf archive.tar ### release one package #### tar-xvf archive.tar-C/tmp #### release the compressed package to the/tmp directory #### tar-cvfj archive.tar.bz2 dir1 #### create A bzip2 compressed package #### tar-xvfj archive.tar.bz2 #### decompress a bzip2 compressed package #### tar-cvfz archive.tar.gz dir1 ### create a gzip format compressed package #### tar-xvfz archive.tar.gz #### decompress a compressed package in gzip format #### zip file1.zip file1 ### create a compressed package in zip format ### # zip-r file1.zip file1 file2 dir1 #### compress several files and directories into a zip package #### unzip file1.zip #### decompress a zip package ####