其他分享
首页 > 其他分享> > 练习

练习

作者:互联网

[11:41:26 root@Centos8 ~]#date "+%F %T"
2021-05-02 11:44:44
[11:46:50 root@Centos8 ~]#date -d '-2 day' +%F
2021-04-30
[11:46:56 root@Centos8 ~]#cat /etc/issue
\S
Kernel \r on an \m
tty:\l
localhost:\n
time:\t
[11:49:21 root@Centos8 ~]#shutdown 18:30 “The system will shutdown autocatically at 18:30 tonight,please save your file”
[11:51:11 root@Centos8 ~]#ls /data/l*[0-9]*[[:lower:]]
[11:51:11 root@Centos8 ~]#ls /data/[[:digit:]]*[^[:digit:]]
[11:51:11 root@Centos8 ~]#ls /data/[^[:alpha:]][[:alpha:]]*
[11:51:11 root@Centos8 ~]#ls /etc/rc[0-6]*
[11:51:11 root@Centos8 ~]#ls /etc/[mnrp]*.conf
[11:51:11 root@Centos8 ~]#l.
.  ..  .bash_history  .bash_logout  .bash_profile  .bashrc  .cshrc  .tcshrc  .viminfo
[12:01:06 root@Centos8 ~]#ls -d .*
.  ..  .bash_history  .bash_logout  .bash_profile  .bashrc  .cshrc  .tcshrc  .viminfo
[12:03:25 root@Centos8 ~]#ls /etc/[^.]*
[12:04:20 root@Centos8 ~]#mkdir -p /testdir/dir1/{x,y}/{a,b}
[12:07:46 root@Centos8 /]#mkdir -p /testdir/dir2/{y,x/{a,b}}
[12:13:52 root@Centos8 testdir]#mkdir -p /testdir/dir{{3,4},5}/dir{6,7}
[12:21:25 root@Centos8 ~]#cp -av /etc/data/backup`date +%F`
[12:21:25 root@Centos8 ~]#cp -a /root/data/rootdir
[12:27:54 root@Centos8 ~]#tr 'a-z' 'A-Z' < /etc/issue > /tmp/issue.out
[12:30:29 root@Centos8 ~]#echo `who` | tr 'a-z''A-Z' > /tmp/who.out
mail -s Help root << EOF
Hello,I am `whoami`,The system version is here,please help me to check it,thanks
`lsb_release -a`
EOF
[12:35:12 root@Centos8 ~]#ls /root | tr '\n' ' '
[12:35:12 root@Centos8 ~]#seq -s+ 100 | bc
5050
[12:36:43 root@Centos8 ~]#echo "xt.,l 1 jr#!$mn 2 c*/fe 3 uz 4" | tr -d [[:alpha:][[:punct:]]
[12:39:14 root@Centos8 ~]#echo $PATH | tr  ':' '\n'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/root/bin
[12:39:18 root@Centos8 ~]#tr -d '\n' < win.txt

标签:11,12,练习,etc,root,testdir,Centos8
来源: https://blog.51cto.com/u_12760193/2750054