Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell Unix中的Find和move命令引发一些错误_Shell_Unix_Find_Exec_Mv - Fatal编程技术网

Shell Unix中的Find和move命令引发一些错误

Shell Unix中的Find和move命令引发一些错误,shell,unix,find,exec,mv,Shell,Unix,Find,Exec,Mv,当我手动运行此查询时,它会抛出一个错误 脚本中的实际命令: find $TMPDIR/tmp0 -name "*.W080" -type d -exec mv -f {} $TMPDIR/w0 \; find $TMPDIR/w0 -name "*.TIF" -type f -exec mv -f {} $FINALDIR/$DATE/W080-RF \; 运行时抛出错误: find: 0652-081 cannot change directory to </sapxchange/O

当我手动运行此查询时,它会抛出一个错误

脚本中的实际命令:

find $TMPDIR/tmp0 -name "*.W080" -type d -exec mv -f {} $TMPDIR/w0 \; 
find $TMPDIR/w0 -name "*.TIF" -type f -exec mv -f {} $FINALDIR/$DATE/W080-RF \;
运行时抛出错误:

find: 0652-081 cannot change directory to </sapxchange/OPENTEXT/Symcor/tmp/tmp0/batch.B75355.L9135.D20150326.T022818.W080>:
: A file, file system or message queue is no longer available.
find: 0652-081 cannot change directory to </sapxchange/OPENTEXT/Symcor/tmp/tmp0/batch.B75356.L9135.D20150326.T022818.W080>:
: A file, file system or message queue is no longer available.

请注意,即使在运行时出现上述错误,作业也会完成并处理数据…

我认为find正在/sapxchange/OPENTEXT/Symcor/tmp/tmp0/batch.B75355.L9135.D20150326.T022818.W080子目录中查找文件,突然整个目录被删除。 所以find不知道在哪里搜索

当所有W080文件处于同一级别时,尝试不查找:
mv-f$TMPDIR/tmp0/*.W080$TMPDIR/w0

您正在临时目录$TMPDIR/中查找。我猜它包含程序运行期间使用的文件。因此,如果单独运行查询,可能没有更多的文件或无法轻松访问。再说一次,只是我的想法,没有时间深入研究它,特别是在寻找-exec:从命令中丢失exec,查看是否有任何数据(例如文件)要处理,然后查看TMPDIR、TMPDIR/tmp0中是否有任何内容,最后查看TMPDIR/w0是否存在并具有写入权限,同上FINALDIR/DATE/W080-RF?