unziping to current time stamp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting unziping to current time stamp
# 1  
Old 06-11-2010
unziping to current time stamp

Basically when ever unzipping the .zip file , what ever the file exist in the .zip file with the time stamp, that is the same time stamp after unzip.
But if i need the current time stamp to the unzipped file(time stamp whenever unzip process occurs )
any helpful option in unzip command ???

Thanks..
# 2  
Old 06-11-2010
i went through the man page for gzip but i am unable to find anything that can be useful for u. but u can write a script that can rename the file after unzippin with the current timestamp.
btw u can write a script to capture the current datetime stamp and change it with the original datetime stamp.
# 3  
Old 06-11-2010
write a script which should 'touch' all the files after unzipping.
# 4  
Old 06-11-2010
what is your decompress command? If it's a tarred|gzipped file, you would want to ignore permissions, for example...
# 5  
Old 06-14-2010
Code:
[root@ temp]# unzip -l no.zip
Archive:  no.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
       91  06-02-10 14:34   no1
       30  06-01-10 13:33   no2
       30  06-01-10 13:34   no3
 --------                   -------
      151                   3 files
[root@ temp]# unzip no.zip
Archive:  no.zip
  inflating: no1
  inflating: no2
  inflating: no3
[root@ temp]# ls -l no1 no2 no3
-rw-r--r-- 1 root root 91 Jun  2 14:34 no1
-rw-r--r-- 1 root root 30 Jun  1 13:33 no2
-rw-r--r-- 1 root root 30 Jun  1 13:34 no3

Here after extraction of .zip file, i need the file should be in current time stamp , rather the old time stamp.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Diplay current time stamp in the output

I want to display the command output in a particular format. can you please suggest how can i do this Output of the command Name= XYZ Company= Alpha Department= Accounts Country= Singapore Name=MNC Company= Beta Department= Engineering country=Malta Name=ABC Company=Gamma... (2 Replies)
Discussion started by: swets
2 Replies

2. Shell Programming and Scripting

Add current time stamp column in existing csv file

Hi , I want to add a new column 'current_time stamp' in my existing csv file with current time stamp for all the records.I tried something this but this is printing 0 with date & time and printed date one line above header.Please help awk -F "," 'BEGIN{ OFS="," } {$6=system("date... (5 Replies)
Discussion started by: netdbaind
5 Replies

3. Shell Programming and Scripting

Convert UTC time into current UNIX sever time zone

Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone. For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies

4. UNIX for Advanced & Expert Users

Need mtime with time stamp

hi all find /folder1 -mtime 1 >folder1 with the above command , I can get the output of all the files which are modified(within folders and sub folders of folder1) in the last 24 hours. but the listed files output , does not contain the time stamp with it. I request you to give... (4 Replies)
Discussion started by: sidharthmellam
4 Replies

5. Shell Programming and Scripting

How do i find a file with the current time stamp in it??

I want to find a file using find or any utility having the current date time stamp..... I have an alternate way to do that.... but that is too way out of logic... so looking out something with find itself (5 Replies)
Discussion started by: nikhil jain
5 Replies

6. Shell Programming and Scripting

Displaying current date time of EDT in IST time

Hi Folks, My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST. IST time leads 9:30 mins to EDT. and i wrote something like below. ... (6 Replies)
Discussion started by: Showdown
6 Replies

7. Solaris

System time and Cron time stamp not matching

On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help here is what i get when i check for system date infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date Tue Apr 24 15:27:43 GMT 2012at same time i executed a cron job, and checked... (4 Replies)
Discussion started by: karghum
4 Replies

8. Shell Programming and Scripting

How to get time duration between two human readable time stamp in Unix?

Here is two time I have: Jul 12 16:02:01 Jul 13 01:02:01 and how can I do a simple match to get difference between two time which is 09:00:00 Thanks in advance. (3 Replies)
Discussion started by: ford99
3 Replies

9. Shell Programming and Scripting

regarding time stamp

hi everyone i am facing a strange problem here suppose content of my file is a=1,2,3 b=2,3,4 c=4,5,6 time= now the problem is i want to add value in front of time variable and the value should be i format only "HHMMSS" so it should be like this a=1,2,3 b=2,3,4 c=4,5,6... (3 Replies)
Discussion started by: aishsimplesweet
3 Replies

10. Shell Programming and Scripting

How to Unzip to current time stamp?

I need the current time stamp to the unzipped file , any helpful option in unzip command ? Thank you. (1 Reply)
Discussion started by: almanto
1 Replies
Login or Register to Ask a Question