Linux exercise

1.修改student的密码,把密码更新成”T3st1ngtlme”(主机字母和数字)

[root@localhost Desktop]# passwd student
Changing password for user student.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

2.显示当前系统时间

[root@localhost Desktop]# date
Thu Mar 30 07:50:33 EDT 2017

3..显示当前系统时间,显示格式为:”小时:分钟:秒 AM/PM”(AM/PM为上下午标识)

[root@localhost Desktop]# date "+%H:%M:%S:%p"
08:17:56:AM

4.统计“/usr/bin/clean-binary-files”的文件大小

[root@localhost Desktop]# wc  /usr/bin/clean-binary-files
  594  1780 13220 /usr/bin/clean-binary-files

5..显示“/usr/bin/clean-binary-files”的文件类型

[root@localhost Desktop]# ls  /usr/bin/clean-binary-files
/usr/bin/clean-binary-files

6.用快捷方式在shell中调用已经执行过的第4条命令

[root@localhost Desktop]# touch file

7.用快捷方式执行最近一条含有”date”关键字的命令

[root@localhost Desktop]# date
Thu Mar 30 08:57:13 EDT 2017

1.用一条命令建立12个文件WESTOS_classX_linuxY(X的数值范围为1-2,Y的数值范围为1-6)

[root@localhost Desktop]# touch WESTOS_class{1..2}_linux{1..6}

2.这些文件都包含在root用户桌面的study目录中

[root@localhost Desktop]# mkdir /root/Desktop/study
mkdir: cannot create directory ‘/root/Desktop/study’: File exists
[root@localhost Desktop]# cp WESTOS_class{1..2}_linux{1..6} /root/Desktop/study

3.用一条命令建立8个文件redhat_versionX(x的范围为1-8)

[root@localhost Desktop]# touch redhat_virsion{1..8}

4.edhat_virsionX这些文件都包含在/mnt目录中的VERSION中

[root@localhost Desktop]# mkdir /mnt/VERSION
[root@localhost Desktop]# cp redhat_virsion{1..8} /mnt/VERSION

5.用一条命令把redhat_versionX中的带有奇数的文件复制到桌面的SINGLE中

[root@localhost Desktop]# mkdir SINGLE
[root@localhost Desktop]# cp redhat_virsion{1,3,5,7} SINGLE
6.)用一条命令把redhat_versionX中的带偶数数的文件复制到/DOUBLE中
[root@localhost Desktop]# mkdir /DOUBLE
[root@localhost Desktop]# cp redhat_virsion{2,4,6,8} /DOUBLE

7.用一条命令把WESTOS_classX_linuxY中class1的文件一动到当前用户桌面的CLASS1中

[root@localhost Desktop]# mkdir CLASS1
mkdir: cannot create directory ‘CLASS1’: File exists
[root@localhost Desktop]# cp WESTOS_class1_linux{1..6} CLASS1

8.备份/etc目录中所有带有名字带有数字并且以.conf结尾的文件到桌面上的confdir中

[root@localhost Desktop]# touch confdir
[root@localhost Desktop]# find /etc/*[[:digit:]]*.conf > confdir

9..删掉刚才建立或者备份的所有文件

[root@localhost Desktop]# rm -fr WES* con*
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值