Perl_Sheep has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks
I am trying to generate a "date" sorted output file with find2perl, but looks like i can only use the ls command and not ls -ltr
How do i use the ls -ltr (sorted by date) command with find2perl? it works with the ls command, but doesn't seem to work with the ls -ltr command.
find2perl /var/prod/run/cloud1 -name "core.*" -ls > f1
The above works fine but
find2perl /var/prod/run/cloud1 -name "core.*" -ls -ltr > f1
dosen't work?
I believe find2perl# ls clears up why it works(ordoesnt) the way it does (it does dils only), and simultaneously tells you the non-portable solution (use -exec)
Also, find2perl finds File::Finder which also does dils only, but if you view the source of sub ls and sub _ls you can see it is written clear enough so that you can simulate -ltr as well