<<<第一单元练习题>>>

1.用student用户登陆系统图形界面

2.打开一个bash

日常作业1_日常作业

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

[student@localhost Desktop]$ passwd

Changing password for user student.

New password: 

Retype new password: 

passwd: all authentication tokens updated successfully.

4.显示当前系统时间

[student@localhost Desktop]$ date

Fri Nov 18 11:58:25 PST 2016

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

[student@localhost Desktop]$ date +%r

12:01:07 PM

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

日常作业1_日常作业_02

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

日常作业1_日常作业_03

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

日常作业1_日常作业_04

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

Ctrl+R+date

日常作业1_日常作业_05




<<<第二单元练习>>>

1.用命令和正则表达式按照要求建立文件

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

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

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

日常作业1_日常作业_06

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

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

*)redhat_versionX这些文件都包含在/mnt目录中的VERSION中

[root@localhost Desktop]# mkdir /mnt/VERSION

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

*)用一条命令把redhat_versionX中的带有奇数的文件复制到桌面的SINGLE中2.管理刚才信建立的文件要求如下

[root@localhost Desktop]# mkdir SINGLE

[root@localhost Desktop]# cp redhat_version{1,3,5,7} SINGLE

*)用一条命令把redhat_versionX中的带偶数的文件复制到/DOUBLE中

[root@localhost Desktop]# mkdir DOUBLE

[root@localhost Desktop]# cp redhat_version{2,4,6,8} DOUBLE

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

[root@localhost Desktop]# mv WESTOS_class1* CLASS1

*)用一条命令把WESTOS_classX_linuxY中class2的文件移动到当前用户桌面的CLASS2中

[root@localhost Desktop]# mv WESTOS_class2* CLASS2

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

[root@localhost Desktop]# mkdir confdir

[root@localhost Desktop]# ls /etc/*[[:digit:]]*.conf

/etc/krb5.conf  /etc/mke2fs.conf  /etc/pbm2ppa.conf  /etc/pnm2ppa.conf

[root@localhost Desktop]# cp /etc/*[[:digit:]]*.conf confdir

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

[root@localhost Desktop]# rm -rf * /mnt/VERSION