test1:

answer:
test:

answer:
1.date +%H:%M:%S >/mnt/time.txt
2.head -n 18 passwd|tail -n +15####head、tail####
1.一般用法:
显示前6行内容
head -n 6 filename
显示最后6行内容
tail -n 6 filename
2.扩展用法:
显示除了最后6行的全部内容
head -n -6 filename
从第5行开始显示文件
tail -n +5 filename
3.find /bin/*[[:upper:]]*
find /bin/*[[:upper:]]* >bin_westos_file.txt|cat bin_westos_file.txt|wc -l####wc####
[root@server1 mnt]# wc passwd
38 66 1917 passwd
行数 单词数 字节数 文件名
4.[student@server1 ~]$ find /etc -name passwd 2>/dev/null
5.[student@server1 ~]$ find /etc -name passwd >/tmp/westos.out 2>/tmp/westos.err
6.[student@server1 mnt]$ find /etc -name passwd 2>&1|tee /tmp/westos.all



被折叠的 条评论
为什么被折叠?



