linux find命令中-exex命令语法

linux find命令中-exex命令语法
find .-type f -user root -exec chown slynux {} ;
这条语句中的 ;有什么作用,书上只解释了{}的作用
伊姿智星 1年前 已收到1个回答 举报

ruyi473 幼苗

共回答了18个问题采纳率:83.3% 举报

-exec command ;
Execute command; true if 0 status is returned.All following
arguments to find are taken to be arguments to the command until
an argument consisting of `;' is encountered.The string `{}'
is replaced by the current file name being processed everywhere
it occurs in the arguments to the command,not just in arguments
where it is alone,as in some versions of find.Both of these
constructions might need to be escaped (with a `') or quoted to
protect them from expansion by the shell.

1年前

8
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.014 s. - webmaster@yulucn.com