Computing.Net > Forums > Unix > script to view files based on date

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

script to view files based on date

Reply to Message Icon

Name: Rahul Iyer
Date: October 3, 2005 at 02:14:45 Pacific
OS: UNIX
CPU/Ram: n/a
Comment:

I have a UNIX box where in files are created every a5 minutes. I need to write a shell script which will take in the date as parameter and return me all files created on that day. Also I will like it to show me only files which have a size greater than 0 i.e. non-empty files. how do I go abt this? I am new to UNIX



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: October 3, 2005 at 15:53:14 Pacific
Reply:

Do you mean then if the script runs at 0300, you only want to see the files that exist from midnight, 0000, to 0300?

You'll need the find command and to test if a file is greater than zero length look at test's -s flag.



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: script to view files based on date

renaming files based on date arguments www.computing.net/answers/unix/renaming-files-based-on-date-arguments/2499.html

passing file to script www.computing.net/answers/unix/passing-file-to-script/7544.html

renaming a file based on systm date www.computing.net/answers/unix/renaming-a-file-based-on-systm-date/4875.html