remove_if (Fwdit first,fwdit last, Pred PR);
Remove from [first,last] all elements that enable PR to return true, and return to the location of the last element between the new zone
Remove_copy
Outit remove_copy (InIt first,init last,outit x,const t val);
Removes the element Val from [first,last) and copies the remaining elements to the beginning of the X interval, returning the position of the last element being copied
Remover_copy_if
Outit remove_copy_i
-E script: multiple scripts can be executed simultaneously.
-F/path/to/sed_script: indicates that the script in the file is read to process the text.
Sed-F/script file ..
-R: indicates using an extended regular expression.
Address:
1. Startline and endline, for example, 1 and 10 indicate rows from the first line to 10th;
2./pattern (Regexp Regular Expression)/, for example,/^ root/. Find the line starting with root.
3./pattern1/,/pattern2/indicates all rows in the middle of the row that is matc
data.AdLockBatchOptimistic = 4, optimistic batch update. The record is not locked during editing. Modification, insertion, and deletion are completed in batch mode.};⑤ For Options, refer to the introduction to the Execute method of the Connection object in this article.[5]Record set traversal and updateAccording to the users table created by executing the SQL command just now, it contains four fields: ID, username, old, birthdayThe following code enables you to open a record set, traverse all r
condition form is:On Example:On init // init is the trigger condition. After triggering, export and mkdir are used as an Action.Export PATH/sbin:/system/bin:/system/xbin // set the environment variableMkdir/system // create a directory
(3) Services usually start an executable program. Options are additional content of the service for use with the service.
Service vold/system/bin/voldSocket vold stream 0660
updated. This is the most secure locking mechanism.
Adlockoptimistc = 3,Optimistic Locking mode. The record is locked only when you call the update method. Before that, you can update, insert, or delete data.
Adlockbatchoptimistic = 4,Optimistic batch update. The record is not locked during editing. Modification, insertion, and deletion are completed in batch mode.};
⑤ For options, refer to the introduction to the execute method of the connection object in this article.
[5] record set traversal
long as three are the same, many characters can be used)\ (\), \1, \2 (latter reference):The reference pattern matches the entire stringExample:Cat/etc/fstabSed ' 1,2d '/etc/fstab--delete 1, 2 rowsSed '/oot/d '/etc/fstab--delete rows containing oot stringsSed ' 1,+2d '/etc/fstab--delete the first row and the first row the next two linesSed '/^\//d '/etc/
/Unix and Unix/Linux;· SMB: resources are shared between Linux/Unix and Microsoft (Windows;2. The host that shares NFS network resources is called: NFS server;Shared SMB network resource discount host is called Samba server;3. Connection Methods of these network resources:(1) NFS connections:Showmount-e IP Address# View shared resourcesMount IP Address:/shared directory/mount point# Attach network resources(2) SMB Connection Methods:Smbclient-l IP address-n# View the shared directories on the sp
The critical situations of Redhat Enterprise 5 system faults mainly include the loss of grub configuration files, the loss of fstab partition Mount tables, and the recovery of faults in the/boot system boot directory being deleted.I. fault recovery for Grub configuration file loss:The Grub configuration file generally refers to the/boot/grub. conf file, which indicates whichPartitions are used to load the kernel and memory image (RAMDISK) files. The l
image filemount–t iso9660-o ro,loop boot.iso/iso plus loop parameter is because the disc is a loopback device, Boot.iso is the image file name,/iso is the mount point;11. Introduce the shared resources on the mounted network1, the network resources in UNIX and Linux are mainly divided into two kinds of NFS (net File System) and SMB· Nfs:linux/unix and Unix/linux are used to share resources;· Smb:linux/unix and Microsoft (Windows) are used to share resources;2. Hosts that share NFS network resou
can be matched by the pattern here;
3, address range:
#,# :
#,+# :
/pattern1/,/pattern2/:
#,/pattern1/:
4. ~: Step in
1~2: Read all odd lines
2~2: Read all even rows
such as: ~]# seq 10 | Sed-n ' 1~2p '
Edit command:
D: Delete
For example, delete the output after the row that matches the specified pattern:
~]# sed '/^uuid/d '/etc/fstab
~]# sed '/nosuid/d '/proc/mounts
Delete 1-4 lines:
~]# sed ' 1,4d '/etc/fs
been loaded by the system;
[Root @ localhost beinan] # Swapon/dev/sda6 Note: Load swap partitions;[Root @ localhost beinan] # Swapon-SFilename type size used priority/Dev/hda7 partition 787144 0-1/Dev/sda6 partition 225144 0-3
Why does my system have two swap partitions? Because I used a mobile USB flash drive to do experiments, I mainly used it for writing tutorials; sda6 is the swap partition I created on the USB flash drive;
If swap is loaded upon startup, modify the/etc/
/: The first match to the row of the PAT1 to the first match to the PAT2 line;$: last line;(4) Step forward: ~N/A: all odd lines;2~1: all even lines;Edit command:D: DeleteSed ' 1,5d '/etc/fstabP: Printing, must use the-n parameter;Ifconfig | Sed-n ' 2p ' shows the second lineSed ' 1~2p '/etc/fstab odd rows displayed 2 timesSed-n ' 1~2p '/etc/fstab show only odd linesSed ' 1~2d '/etc/
Use of text processing tools sed and awkI. Text Processing Sankey grep: a text filtering tool. For details, see blog article 2 and sedsed (stream editor): A Row editing tool that works perfectly with regular expressions. During processing, the currently processed rows are stored in the temporary buffer, called the pattern space. Then, the sed command is used to process the content in the buffer, send the buffer content to the screen, and then process the next line. This will be repeated: sed [op
Format: Mount [-parameter] [device name] [Mount Point]Among the parameters commonly used are:-A installs all file systems that are class-out in the/etc/fstab file.-F disguises mount, making checks on the device and the directory look, but does not really mount the file system.-N does not record the installation in the/etc/mtab file.-R tells the file system to be installed as read-only.-V Displays the installation information in detail.-W installs the
each row in a temporary buffer and edits the copy. Therefore, the original file is not modified.2. Usage of SED
Sed [Option]... 'script' [input-file]...
2.1. Common options: [Option]
-N: Do not output the content in the mode space to the screen;
-E script, -- Expression = Script: Multi-Point editing;
-F/path/to/sed_script_file: one edit command per line;
-R, -- Regexp-extended: extended regular expressions are supported;
-I [suffix], -- in-place [= suffix]: directly edit the original file;
Exa
:
Empowering notation: All permissions for the direct operation of a class of users are rwx, as shown in the following example:
[[emailprotected] ~]# ll Total usage 8 -rw-------. 1 root root 1998 December 7 05:57 anaconda-ks.cfg -RW -r--r--. 1 root root 595 December 03:31 fstab [[emailprotected] ~]# chmod g=rw fstab [[emailprotected] ~]# ll Total usage 8 -rw-------. 1
/: Find replacement, its delimiter can be self-specified, often have [email protected]@@,s###P: Show the rows that were successfully replacedG: Global SubstitutionW FileName: Saves the result of the substitution success to the specified fileP: Displays the contents of the current pattern space in Print, the present pattern spaces.Example Demo :1. Delete all whitespace characters from the beginning of lines in the/etc/grub2.conf file that begin with whitespaceSed ' s#^[[:space:]]\+## '/etc/grub2.
The use of ' fstab '
'/etc/fstab ' is an important configuration file for the ' Mount ' command. You can "root" through the ' Diskdrake ' (Mandrake Linux Control Center-mount point), or modify the file with the editor.
'/etc/fstab ' has several uses:
*
Decide which media to mount automatically when you turn on the boot;*
Specifies the optional, mount point for ea
These days the test found a very strange problem if the TF card inserted into the card and then inserted into the board after hot plug can be mounted on but the use of a USB stick only when the first plug-in can be mounted on the pull down after the plug in the drive can be recognized that the USB stick has been inserted studied the Mountservice and Vold finally by looking at the/proc/mounts file to find the USB stick after the first plug is normal mo
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