Linux installation JDK and decompression commands

Source: Internet
Author: User
Tags bz2 rar unzip rar

Note: Virtual machine installed system, can not be dragged from the desktop directly transfer files, or decompression error

View the system's own installed Java

Rpm-qa | grep java

Delete Non. noarch files

Rpm-e--nodeps file name

1. Create a directory (mkdir Java) and unzip it inside jdk-8u181-linux-x64.tar.gz

2. Configure the Environment Vi/etc/profile and add the last

Export java_home=/usr/java/jdk1.8. 0_181export CLASSPATH=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/ Dt.jar: $JAVA _home/lib/tools.jarexport PATH= $PATH: $JAVA _home/bin

3. Effective configuration file

Source/etc/profile

Unzip command

Tar-C: Create a compressed archive-x: Unzip-T: View content-r: Append files to the end of the compressed archive file-u: Update the files in the original package these five are stand-alone commands that use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed. -Z: With the gzip attribute-J: With the bz2 attribute-Z: With the Compress attribute-V: Show All procedures-O: Unpack the file to the parameters below the standard output-F is a must.-F: Use the file name, remember that this parameter is the last parameter, can only be followed by the file name. # tar-CF All.tar *the. jpg command is to make all. jpg files into a package named All.tar. -C is a means of generating a new package,-f Specifies the file name of the package. # tar-RF All.tar *the. gif command is to add all. gif files to the All.tar package. -R is meant to increase the file. # tar-uf all.tar logo.gif This command is to update the original tar package All.tar in the logo.gif file,-U is the meaning of the update file. # tar-TF All.tar This command is to list all the files in the All.tar package,-T is to list the meaning of the file # tar-XF All.tar This command is to solve all the files in the All.tar package,-x is the meaning of the untie compression TAR–CVF Jpg.tar*.jpg//package All JPG files in the directory into Tar.jpgTAR–CZF jpg.tar.gz *.jpg//after packaging all the JPG files in the directory into Jpg.tar and compressing them in gzip, generate a gzip-compressed package named Jpg.tar.gzTAR–CJF jpg.tar.bz2 *.jpg//after packaging all the JPG files in the directory into Jpg.tar, and compressing them with bzip2, a bzip2 compressed package is generated, named jpg.tar.bz2TAR–CZF Jpg.tar.z *.jpg//after packaging all the JPG files in the directory into Jpg.tar, and compressing them with compress, a umcompress compressed package is generated, named Jpg.tar.zRAR a Jpg.rar *.jpg//rar format compression, need to download rar for Linux firstZip Jpg.zip *.jpg//zip format compression, you need to download the zip for Linux firstDecompression TAR–XVF File.tar//Unzip the tar packageTAR-XZVF file.tar.gz//Decompression tar.gzTAR-XJVF file.tar.bz2//Decompression tar.bz2TAR–XZVF File.tar.z//unzip the tar. ZUnrar e File.rar//unzip RARUnzip File.zip//Unzip zipSummary1. *. Tar with TAR–XVF decompression2, *.gz with gzip-D or Gunzip decompression3, *.tar.gz and *. tgz extract with Tar–xzf4, *.bz2 with bzip2-D or unzip with BUNZIP2 .5. *. tar.bz2 Extract with Tar–xjf6. *. Z Extract with Uncompress7. *. Tar. Z Extract with Tar–xzf8. *. rar with Unrar e decompression9, *.zip with unzip decompression

Linux installation JDK and decompression commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.