Hi.

On Tue, Nov 05, 2013 at 04:25:13PM +0200, Lars Noodén wrote:
> > On Tue, Nov 05, 2013 at 03:13:10PM +0400, Reco wrote:
> >> perl -e 'for(<popularity-*>){((stat)[9]<(unlink))}'
> 
> I have two questions.  Why < before unlink and why stat[9] there?

You have to pass unlink something to delete. Stat is called
without an argument, hence $_ is used for stat too.
'<' is used to give unlink something to work with. Try it like this:

perl -e 'for(<*>){((stat)[9])>(printf)}'


> stat[9] is mtime.

Files are sorted in directory inode by mtime. That saves you sorting
all the file list in directory.

Reco


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131105153315.GB19598@x101h

Reply via email to