Xref: utzoo comp.unix.questions:26448 comp.unix.shell:699 Path: utzoo!utgpu!watserv1!watmath!att!att!emory!wuarchive!uunet!crdgw1!sixhub!davidsen From: davidsen@sixhub.UUCP (Wm E. Davidsen Jr) Newsgroups: comp.unix.questions,comp.unix.shell Subject: Re: Listing files bet. two specified dates Message-ID: <2162@sixhub.UUCP> Date: 24 Oct 90 02:55:14 GMT References: <9220005@hpldsla.sid.hp.com> Reply-To: davidsen@sixhub.UUCP (bill davidsen) Followup-To: comp.unix.questions Organization: *IX Public Access UNIX, Schenectady NY Lines: 20 In article <9220005@hpldsla.sid.hp.com> manoj@hpldsla.sid.hp.com (Manoj Joshi) writes: | Alternatively, has anyone written a utility that will list out all | files that have their modification times between two specified times. | for eg., all files between Oct 1 1990 and Oct 10 1990. The 'le' utility, posted to the net some time ago, has an option -f which causes dates to be output YYYY-MM-DD HH:MM for sorting. It was intended to help with sorting, but would make your task a bit easier, too. You can use awk, get the field using substr rather than the field number, and use the 'split' function to determine if the value is a time, and if so put the year in place of the time. This is an uglier solution, but it uses all portable tools. -- bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen) sysop *IX BBS and Public Access UNIX moderator of comp.binaries.ibm.pc and 80386 mailing list "Stupidity, like virtue, is its own reward" -me