In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "introduction and use of Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Linux is a set of free use and free dissemination of Unix-like operating system, is a POSIX and UNIX-based multi-user, multi-task, multi-threaded multi-CPU operating system.
Linux can run major unix tools, applications, and network protocols. He supports 32-bit and 64-bit hardware. Linux inherits the design idea of Unix with network as the core, and is a multi-user network operating system with stable performance.
The multi-boot process of Linux system is not as complicated as we think, and the process can be divided into five stages.
1. Kernel boot
2. Run init
3. System initialization
4. Set up a terminal
5. User login system
Common commands:
1. Ls command: use the ls command to view not only the files contained in the linux folder across domains, but also the file permissions (including directory, folder, file permissions).
Common parameter collocation:
Ls-a: lists the files in which the directory is located, including. The initial hidden file
Ls-A: list the division. And; and. Other documents of
Ls-r: reverse order
Ls-t: sort by file modification time
Ls-S: sort by file size
Ls-l: in addition to processing the file name, it also lists the permissions, owner, file size and other information of the file in detail (you can write out ll directly)
Example: ll name*, which lists the details of all directories activated with name in the current directory
II. Cd command
Cd / root/Docements: change to directory / root/Docements
Cd. / path: switch to the path directory under the current directory
Cd.. / path: switch to the path directory in the upper directory
3. Rm command
Rm-f: delete files, ignore files that do not exist, and no warning messages appear
Rm-I: users are asked if they want to operate before deletion.
Rm-r: recursive deletion, most commonly used for directory deletion
4. Cp command
-a: copy the properties of the file together
-p: copied with the attributes of the file instead of using the default method, similar to-an and often used for backup
-r: recursive continuous replication for directory replication behavior
Mv command: move the file or modify the file name, according to the second parameter type, such as directory, move the file, such as the file, rename the file
-f:force force means that if the target file already exists, it will be overwritten without being asked.
-I: if the target file already exists, it will be asked whether to overwrite
-u: if the target file already exists and is newer than the target file, it will be updated
VI. Mkdir command
-p: recursively create a directory
-v: displays information every time a new directory is created
-m: create permission directory
7. Pwd command
Pwd: view current path
Pwd-p: view the actual path of the soft connection
8. Find command
-name: find files by file name
-perm: find files by file permissions
-user: find files by file owner
-group: find files according to the group to which they belong
-amin n: find the files accessed in the last N packet in the system
-atime n: find the files accessed by the last nails in the system in 24 hours
-mmin n: find the last N-grouped files in the system that have been changed.
-mtime n: find the files in the system that were changed in the last 24 hours.
Add: the xargs:find command passes the matching files to the xargs command, while the xargs command takes only part of the files at a time, not all of them, so it can process the first part of the files, then the next batch, and so on.
IX. Tar command
You can only use one of the following options to specify the action to be performed by tar, and you can change the behavior of the option by following it with one or more modifiers
-c: create an archive file
-u: add files from file-list to the archive file
-x: extract file-list from the archive and write it to disk
Modifier
-f: use filename to indicate the file name of the archive file to be created or extracted
-j: use bzip2 to compress and decompress when creating or extracting files from archived documents
-z: use gzip to compress and decompress when creating or extracting files from archived documents
-v: show all processes
-t: lists the directories in the archive file
10. Ps command: use to check the status of the currently running process, check it at once, and use top if you need dynamic continuous results
-A: show all processes
-a: show all processes
-e: display environment variables
-f: displays the relationship between processes
-r: displays the processes currently running by the terminal
-aux: displays all processes that contain other uses
Top command: displays the current process and other status of the system. It is a dynamic display process that displays information about the processes being executed by the current system, including process id, memory occupancy, and cpu occupancy.
-c: displays the complete process command
-s: secret mode
-p: specify the process display
-n: the number of times to loop the display
12.
Kill command: sends the specified signal to the appropriate process
-1: terminal disconnected
-2: interrupt
-3: exit
-15: termination
-9: forced termination
-18: continue
-19: pause
The chmod command, which is used to change the access permissions of files or directories on the linux system
14. Grep command: powerful to text search command
15. Vim command: there are three modes: command mode, insert mode and edit mode. Use ESC or I or: to switch modes
In command mode:
Q put forward
: q! Forced exit
Wq saves and exits
: set number displays the line number
: set nonumber hides line numbers
/ apache look for apache in the document, press n to jump to the next, shift+n last
Yyp copy the line of the cursor and paste
Sixteen. Cat command
1. Display the entire file at once: cat filename
2. Create a file from the keyboard cat > filename can only create new files, not edit existing files
3. Merge several files into one file cat file1 file2 > file
-b, output the line number for non-blank lines
-n, output all line numbers
Seventeen, more command: function is similar to cat, will be a page of display, easy for users to read, and the most basic command is to press the blank key to display to the next page, press b to go back to the page to display.
Less command: with more type, but you can browse the file at will with less, while more can only move forward, but not backward, and less will not load the whole file before viewing
Nineteen, tail command: used to display the end of the specified file.
-f loop read
Chown: the owner of the specified file should be asked the specified user and group
This is the end of the introduction and use of Linux. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.