Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Commands for LINUX file management and user and group management

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1, display/etc directory, with non-letter beginning, followed by a letter and other arbitrary length of any character files or directories;

ls -a /etc/[^[:alpha:]]*

2. Copy all files or directories starting with P and ending with non-numbers in/etc directory to/tmp/mytest1 directory;

cp -a /etc/p*[^[:digit:]] /tmp/mytest1/

3. Convert the contents of the/etc/issue file to uppercase and save them to the/tmp/issue.out. file;

4. Summarize and describe how to use the user and group management class commands and complete the following exercises:

(1) Create group distro with GID 2019;

groupadd distro -g 2019

(2) Create user mandriva, whose ID number is 1005; the basic group is distro;

useradd -u 1005 -g distro mandriva

(3) Create user mageia with ID number 1100 and home directory/home/linux;

useradd -u 1100 -d /home/linux mageia

(4) Add password to user mageia, password is mageedu;

(5) Delete mandriva, but keep its home directory;

(6) Create user slackware, ID number of which is 2002, basic group is distro, additional group peguin;

(7)Change the default shell of slackware to/bin/tcsh;

(8)Add additional groups admins for user slackware;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report