Java's entire detailed notes from scratch to proficient

Source: Internet
Author: User

Zookeeper

Linux/Unix notes
Inode: storage ID (address)
Ls-k: view disk partitions
Ls-li: displays the inode Number of the current file.
The directory size depends on the file size and the number of files (directories) in the directory.
No.
Separate multiple commands in one line with semicolons. Example: pwd; cal; date
Last | grep pts/13 indicates viewing records logged on to the server by pts/13.
Find.-mtime-10-print
-10: indicates the value within 10 days,
+ 10: 10 days ago,
.: Indicates the current path.
-Mtime: The last modification time.
-Print: Indicates output to the Monitor (but not available ).
-User 0: indicates that the UID is 0.
Size + 400: greater than 400*0.5 K,-400 indicates less than 400*0.5 K
-Atime: indicates the last access time.
Grep: Find the line that meets the requirements in the file. Used in pipelines (|)
Followed by | indicates to search for the previous output.
For example: cat/etc/passwd | gred liu | sort
Sort: Indicates sorting.
A process is a job and a job is a process.
The frontend is the terminal, and the backend is the server.
When the parent process is killed, the previous child process disappears, and the background job does not depend on any
Terminal, will continue to run
Common LINUX commands (BASICS)
1. man provides help explanations for familiar or unfamiliar commands
For example: man ls, you can view the ls-related usage.
Note: Press q or ctrl + c to exit. You can use ctrl + c in linux.
Terminate the current program.
2. ls view the directory or file owner * and list the files under any directory
Eg: ls/usr/man ls-l
A. d indicates the directory. If it is a "-", it indicates a file. If
If it is l, it indicates a connection file (link)
B. Permission for file or directory permission. Read (r), write (w), and
Run (x ).
3. Copy files using cp
Eg: cp filename1 filename2 // copy filename1
Filename2
Cp 1.c netseek/2.c // copy 1.c to the netseek directory and name it 2.c
4. rm delete files and directories
Eg: rm 1.c // Delete the 1.c File
5. Remove the directory or change the file name.
Eg: mv filename1 filename2 // rename filename1
Filename2
Mv qib. tgz ../qib. tgz // move to the upper-level directory
6. Change the current directory pwd on cd to view the complete path of the current directory
Eg: pwd // view the current directory path
Cd netseek // enter the netseek directory
Cd // exit the current directory
7. cat, more command
Displays the content of a file. The two commands are different: cat
The content is always printed, and more is displayed on the split screen.
Eg; cat> 1.c // You can paste the code into the 1.c file and press ctrl + d.
Save the code.
Cat 1.c or more 1.c // you can view the content in it.
Gcc-o 1 1.c // compile 1.c into an. EXE file.
Translate the code.
8. Modify the chmod command permission usage: one-digit 8-digit number of chmod
Filename.
Eg: chmod u + x filenmame // you only want to run the command for yourself.
// U indicates the file owner, and g indicates the group where the file is located. O indicates other
Human; r table readable, w table writable, x table can run
Chmod g + x filename // the same group of people to execute
9. clear, date command
Clear: clear screen, equivalent to cls in DOS; date: displays the current time.
10. mount a hardware device
Usage: mount [parameter] device load point to be loaded
Eg: mount/dev/cdrom
Cd/mnt/cdrom // enter the cd directory
11. su switches to another person's identity without logging out.
Usage: su-l user name (if the user name defaults, the user name is switched to the root state)
Eg: su-l netseek (if you switch to netseek, you will be prompted to enter
Password)
12. whoami, whereis, which, id
// Whoami: confirm your identity
// Whereis: queries the directory where the command is located and the directory where the help document is located
// Which: query the directory where the command is located (similar to whereis)
// Id: print your UID and GID. (UID: the unique ID of a user.
GID: the unique ID of a user group. Each user can have only one unique UID
And GID)
Eg: whoami // display your login user name
Whereis bin: the directory where the bin is located:
/Usr/local/bin
Which bin
13. grep, find
Grep: Text Content Search; find: file or directory name and permission owner
Match search
Eg: grep success */* Find all files in the current directory
Files containing success characters
14. kill can kill an in-progress or dest state.
Cheng
Eg; ps ax
15. passwd can be used to set a password
16. commands used by the history user
Eg: history // displays the commands used by the user in the past.
17 .!! Execute the last command
18. mkdir command
Eg: mkdir netseek // create the netseek directory
19. tar decompression command
Eg: tar-zxvf nmap-3.45.tgz // extract this to nmap-3.45
In this directory
20. finger allows users to query data of other users
Eg: finger // view the user's usage information
Finger root // view the root Information
Ftp upload/download ftp 192.168.1.100
User: xiangf Pwd xiangf
Put mput upload multiple Get mget downloads multiple
Install Jdk in linux
1. Download jdk (jdk-1_5_0_02-linux-i586.rpm) from the Internet first)
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and all
The user adds executable permissions.
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-ivh jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, simply accept it.
2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set java environment
JAVA_HOME =/usr/java/jdk-1_5_0_02
CLASSPATH =.: $ JAVA_HOME/lib. tools. jar
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
Save and exit.
3. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!
Bash-profile is a configuration file that configures java-home, path, classpath, etc.
. Space. Bash-profile restart

Click to download

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.