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
[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
相关文章推荐
- java-WEB中的监听器Lisener
- Linux socket 初步
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程