CP command, grep command example

Source: Internet
Author: User

1, copy/etc/skel directory for/home/tuserl,/home/ruserl and its internal files belong to the group and other users do not have any access rights.

2. Edit/etc/group file, add group Hadoop

Step (1) vim/etc/group (2) Press the G key to jump to the last line, press the O key: Create a new row below and enter the input mode input information, ESC exit input mode, press two Z key to save and exit.

3, manually edit/etc/passwd file, add user Hadoop, basic group ID is the Hadoop group ID number, home directory is/home/hadoop

4. Copy the/etc/skel directory as/home/hadoop, requiring that the genus Group and other users of the Hadoop directory be modified without any access rights

5, modify the/home/hadoop directory and all internal files of the owner of Hadoop, belong to the group of Hadoop

6. Displays lines in the/proc/meminfo file that begin with uppercase or lowercase s;


7. Display the user whose default shell is non-/sbin/nologin in the/etc/passwd file

8. Display the user whose default shell is/bin/bash in the/etc/passwd file

9. Find one or two digits in the/etc/passwd file

10. Display lines that begin with at least one whitespace character in/boot/grub/grub.conf

11 displays lines with # Beginning with #, followed by at least one whitespace character, and then at least one non-whitespace character in the/etc/rc.d/rc.sysinit file

12 Netstat-tan command execution results with ' LISTEN ', followed by a line that ends with a blank character

13 Add User Bash, Testbash, basher, Nologin (this one user's shell is/sbin/nologin), and then find information on the current system with the same user name as the default shell user

CP command, grep command example

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.