在Linux环境中可以通过方向键的上下按键查看近期键入的命令.但这种方法只能一个一个的查看,其实系统提供了查看所有历史命令的方法. 在终端中输入以下命令查看所有命令: history [root@template ~]# history ifconfig vim /etc/ssh/sshd_config /etc/init.d/sshd restart vim /boot/grub/grub.conf vim /etc/selinux/config vim /etc/sysconfig/netw…
需求描述: 最近在写一个脚本的时候,要判断一个文件是否存在,有怎么样,没有就创建,这个时候 看到了一个test 结合 || 或者 &&的写法,就查看了下资料记录下是怎么个玩法. 操作过程: 1.判断一个脚本是否存在,如果存在就提示文件存在 [mysql@testvm01 baks]$ ls -l total -rw-rw-r--. mysql mysql Jan : innobin.log [mysql@testvm01 baks]$ test -e innobin.log &&a…
需求说明: 今天项目中有一个新的需求,需要在linux环境中搭建一个ftp服务,在此记录下. 操作过程: 1.通过yum的方式安装ftp服务对应的软件包 [root@testvm01 ~]# yum install vsftpd Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscrip…
在Linux环境中可以通过方向键的上下按键查看近期键入的命令.但这种方法只能一个一个的查看,其实系统提供了查看所有历史命令的方法. 在终端中输入以下命令查看所有命令: history [root@template ~]# history 1 ifconfig 2 vim /etc/ssh/sshd_config 3 /etc/init.d/sshd restart 4 vim /boot/grub/grub.conf 5 vim /etc/selinux/config 6 vim /etc/sy…