使用linux的find命令问题

时间:2015-07-02 17:21:26

标签: linux find gnu gnu-findutils

不断收到这么多警告但我的命令工作正常。

find: `api/PlayersImpl0.smali': No such file or directory
find: `api/PlayersImpl1.smali': No such file or directory
find: `api/TurnBasedMultiplayerImpl0.smali': No such file or directory
find: `api/TurnBasedMultiplayerImpl1.smali': No such file or directory
find: `api/TurnBasedMultiplayerImpl2.smali': No such file or directory
find: `api/TurnBasedMultiplayerImpl3.smali': No such file or directory

对于文件,我使用以下命令: -

$cmd  = "find ".'"'.$file_path.'"'." -type f -exec chmod -R 0777 {} +"." > /dev/null";

exec($cmd, $output);

对于文件夹我使用以下命令: -

$cmd1  = "find ".'"'.$folder_path.'"'." -type d -exec chmod -R 0777 {} +"." > /dev/null";

exec($cmd1, $output);

注意: - exec是一个执行shell命令的php函数。在这里,我尝试为所有文件和文件夹提供777的权限。

0 个答案:

没有答案