文件练习

练习
1题.date +%T>>time.txt
date +%H:%M:%S>>time.txt在这里插入图片描述

2题.head -n 18 /etc/passwad | tail -n 3
在这里插入图片描述

3题. ls /bin/[[:upper:]]>bin_westos_file.txt | wc -l

在这里插入图片描述
在这里插入图片描述

4题.find /etc passwd misslies 2>/dev/null

5题.find /etc passwd >/tmp/westos.out

6题.find /etc passwd missile 2>/tmp/westos.err

7题find /etc passwd >/tmp/westos.all 2>&1| cat /tmp/westos.all

8题
mkdir study

touch WESTOS_class{1…2}_linux{1…6} | cp WESTOS_class{1…2}_linux{1…6} student/
在这里插入图片描述
9题
mkdir /tmp/VERSION

cd /tmp/VERSION

touch redhat_version{1…8}
在这里插入图片描述
10题

mkdir SINGLE

cp /tmp/VERSION redhat_version[1357] SINGLE/
在这里插入图片描述
11题

mkdir /DOUBLE

cp /tmp/VERSION redhat_versiom[2468] /DOUBLE/
在这里插入图片描述
12题

mv student/WESTOS_class1_linux* /root/Desktop/CLASS1
在这里插入图片描述
13题

mv student/WESTOS_class2_linux* /root/Desktop/CLASS2
在这里插入图片描述
14题
cp /etc/[[:digit:]].conf confdir/
在这里插入图片描述

rm -fr confdir/
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qwefyjwww/article/details/82913470