GroupGroup basic information stored in/etc/groupGroupadd Tena Add Tena GroupUsing the GPASSWD command-A user name Group name increase user to specified group-d User Name Group name remove users from the specified group-M ' User name, username ' Group name add multipleDelete a groupUse Groupdel Group nameArchiving and compression1 Space saving2 Easy management of fragmented documentsTar Integrated Backup tool-C Create an archive-z-j-j calls the. gz. bz2. xz Format tool for processing-f Specifies
one, process priorityLinux process scheduling and multitaskingEach CPU (or CPU core) can handle only one process at a time, and with time slice technology, the number of processes (and threads) that Linux actually can run exceeds the number of CPUs and cores actually available. The Linux kernel process scheduler quickly switches multiple processes on the CPU core, giving the user the impression that multipl
according to the above command, first find the alias command of the same name, and then find the compound command until the command is found to executeAlias: Alias command is to simplify the integration of the output to a long parameter command, alias definition method aliases la= ' Ls-al ' Alias Unalias laInternal command: Bash comes with a simple command function,External command: is a small program exists in/bin//sbin//usr/bin and other placesCd/etcCd/rootAlias money= ' Money-i 'Function age
/wKioL1i7wWqx_AXbAABKZKOWNOo326.jpg "title=" grep- V.jpg "alt=" Wkiol1i7wwqx_axbaabkzkownoo326.jpg "/>Because the Diercishuru character is the first line, the first row is excluded, only the contents of the following 2 rows are displayedYou can use Tail-2 ceshi.txt to view the contents of the following 2 rows650) this.width=650; "src=" https://s3.51cto.com/wyfs02/M01/8E/45/wKioL1i7wgzi8C2NAAAqWhOEkME498.jpg "title=" tail- 2.jpg "alt=" Wkiol1i7wgzi8c2naaaqwhoekme498.jpg "/>Similarly, Head-2 Ceshi
[0-9],[a-f]
{C1.. C2}
Matches all single characters from C1 to C2, such as {1-6}
{String1,string2,.......}
Match all string characters
(4) Man commend_name: Get a detailed description of the commandThe Man command manual is divided into 8 sections, each section has a part of the introduction, according to the requirements of the selection sectionMan 3 printf/* View printf Library functions */The Manual of the Man command also has a specific sea
jxvf one.tar.bz2Incremental backup: Increases once, so recovery is also a once-in-a-time recoveryDifferential backup: First full backup, then back up after the and together, reply to the time, only onceBackup level 0-9: Only backups that are smaller than the last backup level (backup grows content)Incremental backupDump-0u-f Rech/0.dump/dev/sda3 #将/dev/sda3 Backup to Rech/1.dumpDump-1u-f Rech/1.dump/dev/sda3 #将/dev/sda3 Backup to Rech/1.dumpDump-2u-f Rech/2.dump/dev/sda3 #将/dev/sda3 Backup to R
1. Basic Knowledge Block: ShellSelf-command by Shell program: Built-in command (BUILTIN)Standalone executable program file, file name: external command[[email protected]~] #ls ~ User's current directory #: Command prompt (Administrator account root) $: normal user | Shell Environment |Unique program it refers to the operating system, providing access to the kernel services provided by the program! Intermediate media used by the system to interact with computer hardware, which resolves user-su
connectionipvsadm-a| E-t|u|f lvsaddr-s Scheduling Method-p timeout defaults to 5 minutes(7) NAT Load BalancingThe load balancer has both internal and external network cardsIntranet host Gateway pointing to intranet network cardturn on the core forwarding function echo ' 1 ' >/proc/sys/net/ipv4/ip_forward (8) Dr Load Balancer (simple configuration of each host independent address)internal and external network addresses on the load balancer NICThe RS host has an internal and external address, and
-whitespace-: Non-whitespace of the previous column N0/home: Move to the front of the line prompt $/end: The last character of a line/word?/word Search Word string down/upDelete/copy/pasteX x= del nx: Remove n characters back DD: Delete a whole line of NDD: Delete cursor down n rows d1g: Delete all data from the cursor to the first row DG: Delete all data from the cursor to the last line d$: Delete cursor to the last character of the line D0: cursor to No. 0 character, Delete yy from the beginni
entireCommand aliases:Alias Cmdalias = ' COMMAND [options] [arguments] 'Aliases defined in the shell are valid only for the current shell life cycle, and the valid range of aliases is only for the current shell processUnalias Cmdalias Canceling command aliases\cmdCommand substitution: $ (command), anti-quote: ' command 'To replace a subcommand in a command with the process of executing the resultBASH-supported quotes": Command substitution"": weak reference, can implement variable substitution'
Bash Scripts Foundation II
1.Bash Position Parameters
There are two simple ways to read user input into a variable in bash.
-Use Read to prompt the user for input (using the-P option) and store it directly to one or more variables:
Interactive input
read-p ' Enter your-i-Last name: ' Top last
-use positional parameters Number to read the command-line arguments or option inputs passed to the script. Option number for various special variable
action statement triggers and triggers an eventBegin,endAction statements the data and places it within {} to indicatePrint, printfseparators, fields, and recordsWhen Awk executes, a delimiter-delimited field (field) tag $1,$2: $n is called a domain identity. $ $ $ For all domains, note: and Shell variable $ characters have different meaningsEach line of the file is called a recordOmit action, default to print $Print format: Print item1, item2, ...Points:(1) Comma delimiter(2) Each item of the
Useradd command for creating user accountsUseradd can be used to create user accounts. After the account is built, then use passwd to set the password of the account. You can delete an account by using Userdel. The account number created by using the USERADD directive is actually saved in the/etc/passwd text file.Parameter description:-c-d-e: Specify the account validity period-F: Specify how many days after the password expires to close the account-G: Specifies the group to which the user belon
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.