-e '/111/' p-n test.txt rot:x:0:0:rot:/rot:/bin/bash11111111111111111111111111111111Can write multiple with-E, and-e equivalent to the belt, first match the front of the printing, and then match the subsequent printing, so the first line printing 2 times;[[email protected] ~]# sed-e '/root/p '-e '/bash/p '-n 1.txtroot:x:0:0:root:/root:/bin/bashroot:x:0:0:root:/root:/bin/ bashoperator:x:11:0:operator:/root:/sbin/nologinuser1:x:500:500::/home/user1:/bin/bashuser2:x:
with the name Tom.txt and file system type not VFATFind/tmp-name wa*-type L Find a file with a type of symbolic link at/tmp that begins with the name WAFind/home-mtime-2 in/home search for files that have changed in the last two daysfind/home-atime-1 checked files accessed within 1 daysFind/home-mmin +60 The files that were changed 60 minutes ago at/homeFind/home-amin +30 Check the files that were accessed last 30 minutes agoFind/home-newer Tmp.txt in/home check update time than tmp.txt files o
May find/mnt-name Tom.txt-ftype vfat look for files with the name/mnt and file system type Tom.txt under VFAT find/mnt -name T.txt! -ftype VFAT under/mnt Look for files with the name Tom.txt and file system type not VFAT find/tmp-name wa* l look for files with a type of symbolic link at/tmp that begins with the name WA Ind/home-mtime-2 in/home under the last two days to changeFiles that were moved find/home-atime-1 checked for files accessed within 1 days find/home-mmin +60 was changed at/home
fileAbsolute pathFile in the real location of the system, the file name begins with "/"Relative pathThe file relative to the current location of the name of a shorthand, the name does not start with/, and the name will automatically add the value of the PWD displayIII. Management of documents1.touch creating files or modifying file timestampsTouch File Creation File650) this.width=650; "Width=" 501 "height=" 281 "title=" 221 01.png "style=" width:586
respectively, and the additional group is the tech group, creating another user lily[Email protected] ~]# useradd-u 501-g nsd-g Tech Jim[[email protected] ~]# ID Jimuid=501 (Jim) gid=501 (NSD) Group =501 (NSD), (Tech)[Email protected] ~]# useradd-u 502-g jsd-g Tech Tom[[email protected] ~]# ID Tomuid=502 (Tom) gid=502
password inactive after expiration to inactive-G,--gid Group Force use Group as new primary group-G,--groups groups new list of supplementary groups-A,--append append the user to the supplemental GROUPSmentioned by the-g option without removingHim/Her from other groups-H,--help display this help message and exit-L,--login new_login NEW value of the login name-L,--lock lock the user account-M,--move-home move contents of the home directory to theNew location (with only with-d)-O,--non-unique all
{Deny all;}
16 Configure Nginx, prohibit illegal domain name resolution visit corporate websiteMethod 1: Let the user who uses IP to access the website, or the user who resolves the domain name maliciously, receives 501 error, the command is as follows:server {Listen 80;Servername ;return 501;}Method 2: Jump to the home page via 301, with the following command:server {Listen 80;Servername ;Rewrite ^
associations! ^_^. But here you may find it strange that: ' If I join multiple groups at the same time, then when I do my homework, what is the group? ' Let's talk about the concept of ' effective group '.
# Active Group (effective group) and initial group (initial group)
Remember that every user has the so-called GID in the fourth column of his/etc/passwd? That GID is the so-called ' initial group ' (initial group)! That is, when the user is logged into the system, immediately has the meanin
passwd user name creates password for user
30 User admin # passwd-d passwd-d username Delete user password can also log in
31 User Management # PASSWD-L passwd-l username Lock account Password
32 User Management # passwd-u passwd-u user name unlock account password
33 User Management # PASSWD-S passwd-s username Query account password
34 User Management # Usermod-l usermod-l new username old user name renamed to User
35 User admin # usermod-l usermod-l to lock user name lock User Login
3
SQL Server random data Extraction efficiency optimization2013-05-11 1 Comments Vegetable Light Collection I want to contributeSQL Server random data Extraction efficiency optimization Hermit I recently encountered a very tangled matter, is how to quickly extract a random data from the data table. I generated a simple data table and imported 500W data for testing. is the SQL statement that was used for the first time: Declare @d DatetimeSet @d=getdate ()SELECT Top 1[activityid], [Cardno], [Passwo
mysql-client-5.6.23-1.linux_glibc2.5[Email protected] init.d]#5: Delete the folder that corresponds to MySQLCheck that the individual MySQL folders are cleaned and removed cleanly.[[email protected] INIT.D] # Whereis MySQLMysql:[[email protected] INIT.D] # Find/-name MySQL/var/lib/mysql/var/lib/mysql/mysql/usr/lib64/mysql[[email protected] INIT.D] # Rm-rf/var/lib/mysql[[email protected] INIT.D] # Rm-rf/var/lib/mysql/mysql[[email protected] INIT.D] # Rm-rf/usr/lib64/mysql6: Delete MySQL users an
.linux_glibc2.5 You have new mail in/var/spool/mail/root [Email protected] init.d]# Rpm-ev mysql-client-5.6.23-1.linux_glibc2.5 [Email protected] init.d]# 5: Delete the folder that corresponds to MySQL Check that the individual MySQL folders are cleaned and removed cleanly. [[email protected] init.d]# Whereis MySQL Mysql: [[email protected] init.d]# Find/-name MySQL /var/lib/mysql /var/lib/mysql/mysql /usr/lib64/mysql [Email protected] init.d]# Rm-rf/var/lib/mysql [Email protected] init.d]# R
cleanly. [[email protected] INIT.D] # Whereis MySQL Mysql: [[email protected] INIT.D] # Find/-name MySQL /var/lib/mysql /var/lib/mysql/mysql /usr/lib64/mysql [[email protected] INIT.D] # Rm-rf/var/lib/mysql [[email protected] INIT.D] # Rm-rf/var/lib/mysql/mysql [[email protected] INIT.D] # Rm-rf/usr/lib64/mysql 6: Delete MySQL users and user groups If necessary, delete the MySQL user and the MySQL user group. [[Email protected] ~] # more/etc/passwd | grep mysql Mysql:x:101:
] init.d]# Rm-rf/var/lib/mysql [Email protected] init.d]# Rm-rf/var/lib/mysql/mysql [Email protected] init.d]# Rm-rf/usr/lib64/mysql 6: Delete MySQL users and user groups If necessary, delete the MySQL user and the MySQL user group. [Email protected] ~]# MORE/ETC/PASSWD | grep MySQL Mysql:x:101:501::/home/mysql:/bin/bash [Email protected] ~]# More/etc/shadow | grep MySQL Mysql:!! : 16496:::::: [Email protected] ~]# More/etc/group | grep MySQL mysql:x
PlainCopy print?
[Email protected] ~]# echo >/proc/sys/vm/nr_hugepages
⑶ increase the size of the maximum shared memory segment, this example 12G[Plain]View PlainCopyprint?
[Email protected] ~]# echo 1560281088 >/proc/sys/kernel/shmmax
⑷ increase the size of shared memory, 4K per page[Plain]View PlainCopyprint?
[Email protected] ~]# echo 4194304 >/proc/sys/kernel/shmall
⑸ Adding a MySQL user-owned group to the system kernel[Plain]View PlainCopyprint?
] init.d]# Rpm-ev mysql-client-5.6.23-1.linux_glibc2.5 [Email protected] init.d]# 5: Delete the folder that corresponds to MySQL Check that the individual MySQL folders are cleaned and removed cleanly. [[email protected] init.d]# Whereis MySQL Mysql: [[email protected] init.d]# Find/-name MySQL /var/lib/mysql /var/lib/mysql/mysql /usr/lib64/mysql [Email protected] init.d]# Rm-rf/var/lib/mysql [Email protected] init.d]# Rm-rf/var/lib/mysql/mysql [Email protected] init.d]# Rm-rf/usr/lib64/mysql
the MySQL group, start directory is/home/test)Then enter the/etc/passwd, you can see the following information, in the last line you can see the information of the newly added user. As followsSshd:x:74:74:privilege-separated Ssh:/var/empty/sshd:/sbin/nologinDovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologinWebalizer:x:67:67:webalizer:/var/www/usage:/sbin/nologinSquid:x:23:23::/var/spool/squid:/sbin/nologinPcap:x:77:77::/var/arpwatch:/sbin/nologinHaldaemon:x:68:68:hal Daemon:/:/sbin/nolo
have changed in the last two daysfind/home-atime-1 checked files accessed within 1 daysFind/home-mmin +60 The files that were changed 60 minutes ago at/homeFind/home-amin +30 Check the files that were accessed last 30 minutes agoFind/home-newer Tmp.txt in/home check update time than tmp.txt files or directoriesFind/home-anewer tmp.txt a file or directory that is accessed more than tmp.txt near/homeFind/home-used-2 lists files or directories that have been accessed within 2nd after the file or d
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.