更新时间:2023-02-18 10:32:55
一种考虑子目录(未经测试)的变体:
A variation that takes into account subdirectories (untested):
find /var/www -type f -exec sed -i 's/privelages/privileges/g' {} \;
这将find
/var/www
下的所有文件(不是目录,由-type f
指定),并对找到的每个文件执行sed
命令,将特权"替换为特权".
This will find
all files (not directories, specified by -type f
) under /var/www
, and perform a sed
command to replace "privelages" with "privileges" on each file it finds.