Linux Command First Knowledge

Source: Internet
Author: User

First, view the current catalog file

LS Demo view all files under the demo directory

Ls-l Demo/test.txt--View detailed contents of the specified directory (test.txt)

Second, copy the file

CP ori.txt Demo/des.txt--copy ori.txt content to Des.txt and create new Des.txt

Third, add users

Useradd Zhonglitaxue---Add user zhonglitaxue

Iv. Modifying the user's password

Usermod-p 123456 Zhonglitaxue--Modify the user's password, this way the password is visible

passwd Zhonglitaxue--The password in this way is not visible

Five, see all the Users

Tail-l/etc/shadow--View added users

Vi. Deleting users

Userdel-r Zhonglitaxue

Vii. deletion of files

RM-RF Text--delete the file under text and do not access it

Eight, search function, filter, the desired or do not want to separate open

grep Hello Test.txt--Search for the specified string in file Test.txt

Grep-v Hello Test.txt--Search for all rows in the file test.txt that do not contain a pattern

Nine

Linux Command First Knowledge

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.