求一段unix代码含义并转linux (find -exec ,提示exec参数没找到)

accomp 2015-07-16 08:36:38
find $aaaaa -type d -user $USER -name '[0-9]*' -perm 2755 -exec ls -Rld {} \; >>& $LOGFILE
find $aaaaa -type d -user $USER -name '[0-9]*' -perm 2755 -exec chmod -R g+w {} \; >>& $LOGFILE

原来在unix运行 ,现在改linux了,但这个代码执行时候报错
“find: `-exec' に引数が見つかりません” exec 参数没有找到

用的是 #!/bin/csh c shell 执行,请问这句在linux下应该怎么写 ?
...全文
125 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
luijianfie 2015-07-16
  • 打赏
  • 举报
回复
[root@test test]# find ./ -exec ls -Rld {} \; drwxr-xr-x. 3 root root 4096 Jul 16 21:05 ./ -rw-------. 1 root root 2713741 Jul 16 20:10 ./tshark.txt -rw-r--r--. 1 root root 746711 Jul 16 20:14 ./telnet.txt -rw-r--r--. 1 root root 11011998 Jul 16 20:21 ./telnet1.txt -rw-r--r--. 1 root root 46862236 Jul 16 20:36 ./telnet2.txt drwxr-xr-x. 2 root root 4096 Jul 6 14:24 ./rsync [root@test test]# find ./ -exec chmod -R g+w {} \; [root@test test]# echo $? 0
luijianfie 2015-07-16
  • 打赏
  • 举报
回复
[root@test test]# uname -a Linux test.example.com 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux [root@test test]# find /test -exec cp {} /sample -a \; [root@test test]# echo $? 0 vim testfind #!/bin/csh find /test -exec cp {} /sample -a \; chmod +x testfind ./testfind [root@test /]# echo $? 0 应该是可以的
accomp 2015-07-16
  • 打赏
  • 举报
回复
$aaaaa 是路径

19,619

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧