LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux - Unzip Errors (https://www.linuxquestions.org/questions/linux-newbie-8/linux-unzip-errors-771428/)

guru_ks2004 11-25-2009 05:01 AM

Linux - Unzip Errors
 
Hi Guys,

I am stuck with an unzip error, that happens when the command is run from a shell script..

Archive: /Somefolder/sample.zip
inflating: /Somefolder/f1/f2/f3/sample.txt (warning) cannot set times

This is the error I get ...

The f1/f2/f3/sample.txt is the content of the zip.

Any body knowss anythign about this..
I couldn't replicate the error manually and all works fine when done manually..

TB0ne 11-25-2009 09:33 AM

Quote:

Originally Posted by guru_ks2004 (Post 3769053)
Hi Guys,

I am stuck with an unzip error, that happens when the command is run from a shell script..

Archive: /Somefolder/sample.zip
inflating: /Somefolder/f1/f2/f3/sample.txt (warning) cannot set times

This is the error I get ...

The f1/f2/f3/sample.txt is the content of the zip.

Any body knowss anythign about this..
I couldn't replicate the error manually and all works fine when done manually..

If it works manually, then you've got a problem in your shell script.

Since you don't post your shell script, or give any details about it or your environment, how can we help you?

guru_ks2004 11-26-2009 02:30 AM

Hiya,

The script contains,

unzip <zip file name with the path> -d <current dir>

Apart from this, the script does nothing..

timmeke 11-26-2009 03:07 AM

1/ It's not an error, only a warning. Unzip tries to set the timestamp on the file according to the content of the zip file and fails at that. The file should neverthelss be uncompressed. There are options to disable the time-stamping, but that only fixes the warning, not the real problem.

2/ You didn't answer TBOne's question: from which environment are you calling the script? From a simple terminal window? From cron?... Can you get the script
to print out it's environment, eg
Code:

env > script_env.txt
and then post script_env.txt's contents?

3/ What type of filesystem is the target directory located on? I'm thinking maybe the filesystem doesn't support the usual time-stamping done by unzip.
Try
Code:

df -h /your/target/folder
of course replacing /your/target/folder with the right path.


All times are GMT -5. The time now is 06:11 PM.