Unzip files where modified time>05:00 ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unzip files where modified time>05:00 ?
# 1  
Old 11-06-2007
Question Unzip files where modified time>05:00 ?

Hello Smilie

I am on the shell prompt in a directory, with couple of zip files in it.

How can I

unzip '*.zip' where modified time > 05:00


...please help

Regards
SunnyK
# 2  
Old 11-06-2007
can you please elaborate what do you mean by 05:00? use the find command to pick up files matching your criteria. this gives some more information
# 3  
Old 11-06-2007
Quote:
Originally Posted by Yogesh Sawant
can you please elaborate what do you mean by 05:00? use the find command to pick up files matching your criteria. this gives some more information
I know that it is possible to do

find * -mtime -1

This will display files modified in the last 1 day. I'd like to do this for last 15 hours so it displays the files modified in the last 15 hrs rather than 1 day. Then I'd like to unzip all these files.

Is this possible...

Thanks
SunnyK
# 4  
Old 11-06-2007
Quote:
Originally Posted by Yogesh Sawant
can you please elaborate what do you mean by 05:00? use the find command to pick up files matching your criteria. this gives some more information
Hi Yogesh

I have got it to work using

find * -mmin -1440

which lists files modified in the last 24 hrs (from current time)

I'd also like to unzip these files returned. How do I go about doing this.

Thanks
SunnyL
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need to search for keywords within files modified at a certain time

I have a huge list of files in an Unix directory (around 10000 files). I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40 Can someone let me know what would be the fastest way... (10 Replies)
Discussion started by: virtual123
10 Replies

2. Emergency UNIX and Linux Support

Is there any way to set the files modified date and stamp to last modifies time?

Actually i did modification in a file on server by mistake, now its showing current time stamp, is there any way to set the files modified date and stamp to last modifies time. Please advice here.Thanks in advance.:b: (7 Replies)
Discussion started by: saluja.deepak
7 Replies

3. 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

4. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

5. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

6. UNIX for Advanced & Expert Users

Find and store files based on FileName and Modified Time

Hi, I am currently using the following command: files=(ls enuCPU??.????.exp ntuCPU??.????.exp) I need to now change the commmand to store the file names of files that have been modified before datetime equal to say '02/16/2008 20:30:00' What could I use? (2 Replies)
Discussion started by: edisonantus
2 Replies

7. UNIX for Dummies Questions & Answers

deleting files based on file name and modified time

Hi, I have some log files created in the following fashion Ex: file name modified date 1) s.log1 01-jan-08 2) s.log2 02-jan-08 3) s.log3 03-jan-08 4) s.log4 04-jan-08 Now I want to have the latest 2 logs and delete the others. Can you tell me the one liner /... (1 Reply)
Discussion started by: ammu
1 Replies

8. Solaris

Finding list of modified files for a particular time duration

Hi , I am trying to find out the List of files modified or added aftter installation of any component on SUN solaris box . But i am not able to do it using ls or find command . Can somebody help me out ? Thanks Sanjay Gupta (2 Replies)
Discussion started by: sanajyg_mnit
2 Replies

9. Shell Programming and Scripting

Finding out the last modified time for files

I need to find out the last modified time for the files which are older than 6 months. If I use ls -l, the files which are older than 6 months, I am just getting the day, month and year instead of exact time. I am using Korn shell, and SUN OS. Thanks in Advance, Kiran (3 Replies)
Discussion started by: kumariak
3 Replies

10. UNIX for Dummies Questions & Answers

Checking modified time of files

My problem is with the find command. After looking through the forum I've got - find . -mtime 2 -name "*" which gives me a list of all the files modified in the last 2 days. How do I change this to list files modified in the last 2 hours? Sorry if this question is already on the forum... (4 Replies)
Discussion started by: am97395331
4 Replies
Login or Register to Ask a Question