shell - Find and move command in Unix throwing some error -


when run queries manually, throws error.

actual command in script:

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 \; 

error throws @ runtime:

find: 0652-081 cannot change directory </sapxchange/opentext/symcor/tmp/tmp0/batch.b75355.l9135.d20150326.t022818.w080>: : file, file system or message queue no longer available. find: 0652-081 cannot change directory </sapxchange/opentext/symcor/tmp/tmp0/batch.b75356.l9135.d20150326.t022818.w080>: : file, file system or message queue no longer available. 

p.s – please note after above error comes in runtime, job completes , process data…

i think find looking files in subdirs of /sapxchange/opentext/symcor/tmp/tmp0/batch.b75355.l9135.d20150326.t022818.w080 , whole dir has been removed.
find doesn't understand is searching.

when w080 files @ same level, try without find:
mv -f $tmpdir/tmp0/*.w080 $tmpdir/w0


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -