in reply to •Re: number of files in directory - one liner
in thread number of files in current directory - one liner

nope. this lists directories and symlinks too. i'm trying to list just files. jmcnamara has an uglier solution, but it works ;)

~Particle ;̃

  • Comment on Re: •Re: number of files in directory - one liner

Replies are listed 'Best First'.
•Re: Re: •Re: number of files in directory - one liner
by merlyn (Sage) on Mar 27, 2002 at 17:37 UTC

      I feel like golfing ;)

      # 123456789_123456789_123 perl -le'print~~grep-f,<@ARGV/*>' dir # Assuming a single dir, of course. And assuming a *nix-like environme +nt with unbroken libraries.
      I like glob() and chicken.

      U28geW91IGNhbiBhbGwgcm90MTMgY
      W5kIHBhY2soKS4gQnV0IGRvIHlvdS
      ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
      geW91IHNlZSBpdD8gIC0tIEp1ZXJk