How Can I Clean Up Files That Don't Exist?
Norberto Meijome
freebsd at meijome.net
Wed Jun 29 04:30:44 GMT 2005
Drew Tomlinson wrote:
> I used the following tar command to copy a file hierarchy:
>
> tar cfp - -C /home . | tar xfpv - .
>
> However when I hit user maildirs, many files get copied but I also get a
> lot of errors such as these:
>
> ./<user>/Maildir/.Trash/cur/1113462063.17964_0.blacklamb.mykitchentable.net:2,S
>
> tar:
> ./<user>/Maildir/.Trash/cur/1113462063.17964_0.blacklamb.mykitchentable.net\:2,S:
> Cannot open: No such file or directory
>
I've seen this happen many times, not related to one particular app, but
always with temporary filenames / very transient filenames (
/proc/<PID>/, etc). I dont' know for sure, but I would say that there's
a short lag between tar getting the list of files to process and
actually working on them. By the time it gets to them, they are gone.
If you need to get a snapshot of a filesystem in a coherent form you
need to make sure it doesnt change from under you - check the snapshot
functionality in 5.x, or go single user or stop those processes creating
temp files, which may not be an option. I suggest u ignore those messages.
HTH,
Beto
More information about the freebsd-questions
mailing list