bash's [ command & [[ keyword】的更多相关文章

[bash's [ command & [[ keyword] [ (test) command: bash中的条件测试語句, [ condition ], 并不是一个語句, 而是一个命令, 命令的名字是 [ , 这个命令期待最后一个参数是 ] . 在terminal中键入 whereis [, 可以看到[ 命令被放在系统中的哪个地方. [[ keyword: [[是[的扩展, 是bash中的keyword,提供比[更强大的功能, 更方便的使用方法. Special primitives tha…
环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not found 查看openssh相关包: [root@oradb23 ~]# rpm -qa openssh* openssh-5.3p1-94.el6.x86_64 openssh-server-5.3p1-94.el6.x86_64 发现服务器默认没有安装openssh的客户端. yum 安装opens…
由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 重新启用这些命令 如果 /etc/profile存在错误而导致source 不能成功,可以使用 /bin/vi  /etc/profil…
今天有一同事安装了ORACLE后,在切换账号时遇到错误提示"-bash: .bash_profile: command not found".如下所示 [root@GLETestLinux ~]# su - oracle -bash: .bash_profile: command not found [oracle@GLETestLinux ~]$ more .bash_profile .bash_profile   # Get the aliases and functions  …
今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要考虑root 的$PATH里是否已经包含了这些环境变量. 主要是这四个:/bin , /usr/bin, /sbin, /usr/sbin. 四个主要存放的东东: ./bin: bin为binary的简写主要放置一些系统的必备执行档例如:cat.cp.chmod df.dmesg.gzip.kill…
[root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括iostat,mpstat,sar,sa [root@testhost ~]#yum install -y sysstat 安装完成后,再执行iostat命令. 解释: avg-cpu段:%user: 在用户级别运行所使用的CPU的百分比.%nice: nice操作所使用的CPU的百分比.%sys:…
[root@jboss ~]# mysql -u root -p-bash: mysql: command not found 需要安装mysql # yum install mysql之后就行 了…
bash:fdisk:command not found [lansir@Red-Hat ~]$ fdisk -l-bash: fdisk: command not found 原因是fdisk不在PATH路径中 [lansir@Red-Hat ~]$ echo $PATH/usr/local/bin:/bin:/usr/bin [lansir@Red-Hat ~]$ whereis fdiskfdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz 解…
一般出现这个-bash: make: command not found提示,是因为安装系统的时候使用的是最小化mini安装,系统没有安装make.vim等常用命令,直接yum安装下即可: yum -y install gcc automake autoconf libtool make…
1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况,解决的方法是一样的. # whereis ifconfig #ifconfig位置 ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig..gz # echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin…