Linux作业

1.添加一个以自己的姓名拼音命名的新用户。
Adduser wht
2.设置该用户的密码。
[root@cobbler user1]# passwd WHT
更改用户 WHT 的密码 。
新的 密码:
重新输入新的 密码:
抱歉,密码不匹配。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。

3.使用新用户远程登录centos。
(以下操作除必要切换到root外,以下操作均在该用户下执行)

[root@cobbler user1]# su WHT
[WHT@cobbler user1]$ cd

4.屏幕上输出“I am xxx, my student ID number is xxxxxxxxx.”

[WHT@cobbler ~]$ echo I am WHT, my student ID number is 1948050**.
I am WHT, my student ID number is 1948050**.

5.显示系统时间,并将系统时间修改为2020年10月28日零点。

[WHT@cobbler ~]$ date
2020年 10月 28日 星期三 11:09:05 CST

[root@cobbler WHT]# date -s “2020-10-28 00:00:00”
2020年 10月 28日 星期三 00:00:00 CST
[root@cobbler WHT]# date
2020年 10月 28日 星期三 00:00:10 CST
[root@cobbler WHT]# su WHT
[WHT@cobbler ~]$ date
2020年 10月 28日 星期三 00:00:28 CST

6.查看2025年12月18日是星期几。

[WHT@cobbler ~]$ cal 18 12 2025
十二月 2025
日 一 二 三 四 五 六
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

7.查看并写出ls命令中-s选项的帮助信息。

ls –help
-S sort by file size
–sort=WORD sort by WORD instead of name: none (-U), size (-S),
time (-t), version (-v), extension (-X)
–time=WORD with -l, show time as WORD instead of default
modification time: atime or access or use (-u)
ctime or status (-c); also use specified time
as sort key if --sort=time
–time-style=STYLE with -l, show times using style STYLE:
full-iso, long-iso, iso, locale, or +FORMAT;
FORMAT is interpreted like in ‘date’; if FORMAT
is FORMAT1FORMAT2, then FORMAT1 applies
to non-recent files and FORMAT2 to recent files;
if STYLE is prefixed with ‘posix-’, STYLE
takes effect only outside

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值