一. find命令:
warning警告
-maxdepth 这个参数要放在其他参数之前。
[root@oldboyedu59 ~]# find / -type d -maxdepth 1
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.
/
/boot
/dev
/proc
/run
/sys
/etc
/root
/var
/tmp
/usr
/home
/media
/mnt
/opt
/srv
/old
/oldboy
/lidao
/oldwang
/newwang
/data
/tmp01
[root@oldboyedu59 ~]#
[root@oldboyedu59 ~]# find / -maxdepth 1 -type d
/
/boot
/dev
/proc
/run
/sys
/etc
/root
/var
/tmp
/usr
/home
/media
/mnt
/opt
/srv
/old
/oldboy
/lidao
/oldwang
/newwang
/data
/tmp01
参数书写错误
Expected a positive decimal integer argument to -maxdepth, but got ‘-type’
发现了一个-maxdepth这个参数后面应该加上数字,但是却找到了-type
[root@oldboyedu59 ~]# find /etc/ -maxdepth -type f -iname "*.conf"
find: Expected a positive decimal integer argument to -maxdepth, but got ‘-type’
参数书写错误
Arguments to -type should contain only one letter
-type的参数 应该只是一个字母
[root@oldboyedu59 ~]# find /etc/ -maxdepth 1 -type -iname "*.conf"
find: Arguments to -type should contain only one letter
Invalid argument 无效的参数
不支持小数,使用整数
[root@oldboy001 ~]# find /tmp/ -size -0.5k
find: Invalid argument `-0.5k' to -size
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)