1820140 Members
3280 Online
109619 Solutions
New Discussion юеВ

Re: tar: cannot stat

 
SILVERSTAR
Frequent Advisor

tar: cannot stat

Hello,
there is a script which make a tar of two files into a directory and I get the error:
tar: cannot stat PDTSTOR*. Not dumped.

Command:
tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT PD
TSTOR1 PDTSTORE &
compress -c /Arrow/fifoqa.dmp > /Arrow/qa.tar.Z

the scripts is scheduled by the 'root' crontab

-rw-rw-r-- 1 sesaprod business 364894720 Jun 24 08:01 /Arrow/.ASPF/PDT/PDTSTOR1
-rw-rw-r-- 1 sesaprod business 729143040 Jun 24 08:01 /Arrow/.ASPF/PDT/PDTSTORE

drwxr-xr-x 95 sesaprod business 4096 Jun 18 22:00 .ASPF
drwxrwxrwx 3 sesaprod business 184320 Jun 24 08:01 PDT

The permissions seem to be right, the file is not temporary, it is always present.
The file is continuing filled by a process.

Is there any explanation for this ?

thanks
Angelo



7 REPLIES 7
T G Manikandan
Honored Contributor

Re: tar: cannot stat

your command
#tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT PD
TSTOR1 PDTSTORE &


-C option should point to a directory
-C option would just call chdir

Just use

#tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT &

else

#tar -cvf /Arrow/fifoqa.dmp /Arrow/.ASPF/PDT/PD
TSTOR1 /Arrow/.ASPF/PDT/PDTSTORE

THanks
Sanjay Kumar Suri
Honored Contributor

Re: tar: cannot stat

The command should work.

tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT PDTSTOR1 PDTSTORE &

Check if the same is working manually without cron and confirm.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
SILVERSTAR
Frequent Advisor

Re: tar: cannot stat

Hi,
tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT PDTSTOR1 PDTSTORE &
compress -c /Arrow/fifoqa.dmp > /Arrow/qa2.tar.Z
above works without problem.


tar -cvf /Arrow/fifoqa.dmp /Arrow/.ASPF/PDT/PDTSTOR1 /Arrow/.ASPF/PDT/PDTSTORE &
compress -c /Arrow/fifoqa.dmp > /Arrow/qa.tar.Z
above works without issue

in both case I used a new job

So.. there should be something else

regards
Angelo
Sanjay Kumar Suri
Honored Contributor

Re: tar: cannot stat

What is that something? Check if there are some issues in cron etc.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
SILVERSTAR
Frequent Advisor

Re: tar: cannot stat

Hi,
problem fixed
tks
Fabio Ettore
Honored Contributor

Re: tar: cannot stat

Ciao Angelo,

if your problem is solved then it is the right moment to assign points for guys that helped you! :-)
Also please explain what did you do to fix the problem, it can be useful for people that in future can have the same or similar problem.

Thanks for your collaboration!

No points for this my post.

Best regards,
Ettore
WISH? IMPROVEMENT!
SILVERSTAR
Frequent Advisor

Re: tar: cannot stat

There was an error in the original problem description, the error was caused by the command :
tar -cvf /Arrow/fifoqa.dmp -C /Arrow/.ASPF/PDT PDTSTOR*

When the * has been eliminated and than replaced by real file name the error has disappeard.

rgd
Angelo