本文共 1832 字,大约阅读时间需要 6 分钟。
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_644、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.54
10.230.21.133 esbserver54
转载地址:http://yumra.baihongyu.com/