On Mon, 03 Jan 2005 14:00, Volker Kuhlmann wrote:
> > How do I list files created in a directory on a specified date?
> >
> > ls -l |grep 'Dec 28'
> >
> > works but I want the output to be in short format.
>
> I'd use my usual collection of shell scripts. What do you mean by "short
> format" - just the file name?
>
> listall -S | grep -- -12-28 | cut -c 33-
>
> listall brings the listing into a defined format on which you can use
> grep and cut. Will fail (like just about everything else) on filenames
> containing newlines.
>
> Volker

The problem; I wanted a list of file names in a directory, created on a 
certain specified date.

The solutions; [1]

ls -l -Q|grep 'Jan  4'|cut -d '"' -f 2

Wouldn't you know it. After head butting the wall for ages to get the first 
solution, a second solution is found with little extra effort.

stat -c %y#%n * |grep 2005-01-04|cut -d '#'  -f2

Thanks to all for their suggestions.

Cheers Ross Drummond


[1] I was not concerned about the differences between the times of creation 
and modification as the files once created are rarely modified.

Reply via email to