您的位置:首页 > 运维架构 > Linux

LINUX命令报错

2016-05-07 15:57 489 查看
1、find: paths must precede expression

[root@localhost /]# find /u01/app/diag/tnslsnr/fossdb/listener/alert -name log_*.xml
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
[root@localhost /]#
[root@localhost /]# find /u01/app/diag/tnslsnr/fossdb/listener/alert -name 'log_*.xml'
进行查找资料,多文件的查找的时候需要增加单引号

[root@localhost /]# find /u01/app/diag/tnslsnr/fossdb/listener/alert -name 'log_*.xml'
2、find: missing argument to `-exec’ 或 find: 遗漏“-exec”的参数
[root@localhost /]#find /u01/app/diag/tnslsnr/fossdb/listener/alert -name 'log_*.xml' -exec rm -rf {}\;
find: missing argument to `-exec’

要这样
find /u01/app/diag/tnslsnr/fossdb/listener/alert -name 'log_*.xml' -exec rm -rf {} \;--这里要加空格

3、# scp
-bash: scp: command not found
新搭建的服务器上没有scp命令
在一台正常的服务器上运行如下命令
# which scp
/usr/bin/scp

# rpm -qf /usr/bin/scp

openssh-clients-4.3p2-72.el5
在有问题的服务器上运行如下命令
# yum install openssh-clients
或者从光盘上安装
# rpm -ivh
libedit-2.11-4.20080712cvs.1.el6.x86_64
# rpm -ivh
openssh-clients-5.3p1-20.el6.x86_64
4、sudo: sorry, you must have a tty to run sudo

使用不同账户,执行执行脚本时候sudo经常会碰到 sudo: sorry, you must have a tty to run sudo这个情况,其实修改一下sudo的配置就好了

vi /etc/sudoers (最好用visudo命令)

注释掉 Default requiretty 一行

#Default requiretty

意思就是sudo默认需要tty终端。注释掉就可以在后台执行了。
5、can't get address for localhost
X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known

[root@esbserver54 configuration]# cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost::1 localhost6.localdomain6 localhost6#127.0.0.1 esbserver54#10.230.13.54 esbserver54#10.230.13.54 SANTAO_ESB_10#10.230.13.54 SANTAO_ESB_10.230.13.5410.230.21.133 esbserver54
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  LINUX expression listener