Linux study notes 2

http://jingyan.baidu.com/article/4d58d5412917cb9dd4e9c0ed.html linux how to use the top command to view the system status JAVA
EE development environment to build cdrom 2. Copy the installation files to the installation directory cp file name /home 3. Switch the directory to cd /home 4. Install? ? ? .bin ./???.bin 5. Configure environment variables vi /etc/profile tar -zxvf ....tar.gz //Decompress the file in .tar.gz format to tar -zxvf xx.tar.gz .tar Extract the .bz2 format to tar -jxvf xx.tar.bz2 tar -c: create a compressed archive -x: decompress -t: view the content -r: append files to the end of the compressed archive -u: update the files in the The five are independent commands, and one of them must be used for compression and decompression. It can be used in conjunction with other commands, but only one of them can be used. The following parameters are optional when compressing or decompressing archives as needed. -z: with gzip attribute




























-j: with bz2 attribute
-Z: with compress attribute
-v: show all processes
-O: unpack the file to standard output

The following parameter -f is required
-f: use the file name, remember, this parameter is The last parameter can only be followed by the file name.
# tar -cf all.tar *.jpg This command is to type all .jpg files into a package named all.tar. -c means to generate a new package, -f specifies the file name of the package.
# tar -rf all.tar *.gif
This command is to add all .gif files to the all.tar package. -r means to add files.
# tar -uf all.tar logo.gif
This command is to update the logo.gif file in the original tar package all.tar, -u means to update the file.
# tar -tf all.tar
This command is to list all the files in the all.tar package, -t means to list the files
# tar -xf all.tar
This command is to extract all the files in the all.tar package, -x means
unzip compress
tar –cvf jpg.tar *.jpg //Package all jpg files in the directory into tar.jpg
tar –czf jpg.tar.gz *.jpg //Package all jpg files in the directory After it becomes jpg.tar, it is compressed with gzip to generate a gzip compressed package named jpg.tar.gz
tar –cjf jpg.tar.bz2 *.jpg //Pack all jpg files in the directory into jpg.tar, and compress it with bzip2 to generate a bzip2 compressed package named jpg.tar.bz2
tar – cZf jpg.tar.Z *.jpg //Pack all jpg files in the directory into jpg.tar, and compress it with compress to generate a umcompress compressed package named jpg.tar.Z
rar a jpg. rar *.jpg //For compression in rar format, you need to download rar for linux
zip first jpg.zip *.jpg //For compression in zip format, you need to download zip for linux first and

decompress
tar –xvf file.tar //Decompress tar package
tar -xzvf file.tar.gz //decompress tar.gz
tar -xjvf file.tar.bz2 //decompress tar.bz2
tar –xZvf file.tar.Z //decompress tar.Z
unrar e file.rar //decompress rar
unzip file.zip //

Summary of decompression zip
1, *.tar decompress with tar -xvf
2, *.gz decompress with gzip -d or gunzip
3, *.tar.gz and *.tgz decompress with tar -xzf
4, * .bz2 decompress with bzip2 -d or bunzip2
5, *.tar.bz2 decompress with tar -xjf
6. Uncompress *.Z with uncompress 7, * .tar.Z with
tar –xZf unzip 8 ,
*.rar with unrar e unzip
9, *.zip with unzip Click on accept license to download, use the following command to download directly. wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk -7u71-linux-x64.rpm 2. Mount the mount command mount [-parameter] [device name] [mount point] Special instructions: when mounting a CD-ROM drive, you can directly use the mount /mnt/cdrom unmount command umount [ Device name] View disk usage df [-parameter] For example, df -l View which partition a directory is in df [full path of the directory] View the specific situation of the Linux system partition fdisk -l Track the network tracert ip address
























history List historical commands
! 2 Execute the line of the historical command
! ls executes the last command starting with ls

3 virtual machine centos system networking
Refer to http://www.jb51.net/os/RedHat/276383.html
to modify /etc The IP value of /sysconfig/network-scripts/ifcfg-eht0


  BROADCAST must be consistent with the ip in VMNET8 and the last digit must be 255

  The IP value of IPADDR must be consistent with the ip in VMNET8 and the last digit must be 1~255 The

  IP value of GETWAY should be consistent with the ip in VMNET8 and the last digit is 2

  eg:

  my local ip is 192.168.78.1, then the correct configuration is:

  BROADCAST=192.168.78.255

  IPADDR=192.168.78.1

  GETWAY =192.168.78.2

  After the configuration is complete, please enter the command "service network restart" to restart the network service.
Mainly to open two windows services vm dhcp net two services

four firewall
open service iptable start
close service iptable stop
restart service iptable restart

1. Check which ports are opened netstat -anp
2. Close the port number: iptables -A INPUT -p tcp --drop port number -j DROP
  iptables -A OUTPUT -p tcp --dport port number -j DROP
3. Open the port No.: iptables -A INPUT -ptcp --dport port number -j ACCEPT
Fourth, the following is the use of linux open port command.
  nc -lp 23 & (open port 23, that is, telnet)
  netstat -an | grep 23 (check whether port 23 is open)
5. Linux open port command Each open port requires a corresponding listener program.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326536410&siteId=291194637