QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 961|回复: 3

question--find and pipeline

[复制链接]
发表于 2006-1-4 11:56:22 | 显示全部楼层 |阅读模式
I use
find . -name "*" | chmod 777

but the result is :
chmod: too few arguments
Try `chmod --help' for more information.

Why it wouldn't work?
Thank you!
发表于 2006-1-4 14:35:13 | 显示全部楼层
为什么要用find呢,好像你是全部都改啊
回复

使用道具 举报

发表于 2006-1-4 15:36:20 | 显示全部楼层
应该用find -exec 吧, 为什么用管道?
回复

使用道具 举报

 楼主| 发表于 2006-1-4 17:36:12 | 显示全部楼层
I have tried that
1)chmod -R 777 *
2)find . -name * -exec chmod 777 {} \;
this two command can change all the files in the current directory.
but what about useing 管道 to transfer the search result to chmod command?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-1 21:19 , Processed in 0.046089 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表