1 tar command
1 from the network to download the source package, the most common is the. tar.gz package, and part of it. tar.bz2 package to decompress is simple:. tar.gz format decompression for TAR-ZXVF xx.tar.gz.tar.bz2 format to TAR-JXVF xx.tar.bz2 Problems: 2 Error extracting tar.bz2 file with tar debian:/usr/src# tar jxf linux-2.6.26.tar.bz2tar:bzip2:can Not exec:no such file or directorytar:error are not recoverable:exiting Nowtar:child returned status 2tar:error exit D Elayed from previous errors solution install BZIP2 package apt-get Install bzip23 tar: Remove the Beginning "/" resolution from the member name: Use uppercase P[[email protected] ~]# tar CzP VF test.tar.gz/root/tomcat/
2 wget-c Command
1 wget-c has been downloaded will not be downloaded [[email protected] sh]# wget-c http://mirrors.cnnic.cn/apache/httpd/ Httpd-2.4.23.tar.bz2--2016-11-23 18:18:12--http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.23.tar.bz2 is parsing the host mirrors.cnnic.cn (mirrors.cnnic.cn) ... 218.241.113.17, 218.241.113.17 is connecting mirrors.cnnic.cn (mirrors.cnnic.cn) |218.241.113.17|:80 ... is connected. An HTTP request has been made and is waiting for a response ... 416 requested Range not satisfiable file is downloaded and no action is taken.
3 Cat command and EOF ID output Shell to file
Cat command and EOF ID output Shell to file link: http://www.cnblogs.com/zht-blog/p/4065668.html In some cases, we may need to generate a temporary file in the script, The file is then placed in the directory as the final file. (You can refer to the Ntop.spec file) There are several benefits, one of which is that temporary files are not unique, can be assigned by variables, and can generate different final files based on different judgments, and so on. The cat and Eofcat commands are a text output command under Linux, usually for viewing the contents of a file; EOF is "End of file", which represents the text terminator. Combining these two identities avoids the use of multi-line echo commands and results in multiple lines of output. Second, use to see the example is the fastest familiar method:# cat << eof > test.sh> #!/bin/bash> #you shell script writes here.> eof Results: Reference # cat test.sh#!/bin/bash#you Shell script writes here. As you can see, the content of test.sh is cat-generated content. Third, other writing 1, append file # cat << eof >> test.sh2, change a way of writing # cat > TEST.SH&NBSP;<<&NBSP;EOF3, EOF is just a sign, not a fixed # cat << hhh > iii.txt> sdlkfjksl> sdkjflk> asdlfj> hhh here "HHH" instead of "EOF" function. The result is the same. Reference # cat iii.txtsdlkfjkslsdkjflkasdlfj4, non-script if not in the script, we can output the identity of EOF with Ctrl-d # cat > Iii.txtsklDjfkljsdkfjklkljkljkljkljlkctrl-d Results: Reference # cat iii.txtskldjfkljsdkfjklkljkljkljkljlk[[email protected] sh]# cat <<eof> ^c[[email protected] sh]# cat < <EOF>test.sh> #!/bin/sh> #you shell script writes here> eof[ [Email protected] sh]# more test.sh #!/bin/sh#you shell script writes here
This article is from the "Drow blog" blog, please be sure to keep this source http://6874869.blog.51cto.com/6864869/1877937
Command set under Linux