早教吧 育儿知识 作业答案 考试题库 百科 知识分享

linuxfind命令中-exex命令语法find.-typef-userroot-execchownslynux{}\;这条语句中的\;有什么作用,书上只解释了{}的作用

题目详情
linux find命令中-exex命令语法
find .-type f -user root -exec chown slynux {} \;
这条语句中的 \;有什么作用,书上只解释了{}的作用
▼优质解答
答案和解析
-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.