[wplug] ls puzzle

Eric C. Cooper ecc at cmu.edu
Sun Oct 3 18:09:12 EDT 2004


On Sun, Oct 03, 2004 at 06:04:26PM -0400, Brandon Kuczenski wrote:
> the challenge: how to list all files in a directory, but omit
> subdirectories?  I've come up with the following, but would like something
> more efficient:
> 
> ls -l | grep -v ^d | awk ' { print $NF } '

find -type f -maxdepth 1

-- 
Eric C. Cooper          e c c @ c m u . e d u


More information about the wplug mailing list