Oct 22, 2003 #1 darfader Programmer Aug 6, 2003 38 GB env SunOS 5.6 ksh Hi, I used to use this ls -l | grep ^d to list directories but am now receiving this error $ ls -l | grep ^d d: not found $ Usage: grep -hblcnsviw pattern file . . . what is another way to list only directories ? tia,
env SunOS 5.6 ksh Hi, I used to use this ls -l | grep ^d to list directories but am now receiving this error $ ls -l | grep ^d d: not found $ Usage: grep -hblcnsviw pattern file . . . what is another way to list only directories ? tia,
Oct 22, 2003 #3 jad Programmer Apr 7, 1999 1,195 GB you could try doing ^d in '' quotes. Upvote 0 Downvote
Oct 22, 2003 Thread starter #4 darfader Programmer Aug 6, 2003 38 GB yes, they both work, thanks Upvote 0 Downvote
Oct 25, 2003 #5 dchoulette Programmer Jun 25, 2002 245 FR Beware than mrregan solution will find all directories AND subdirectories, thus is not equivalent to jad solution. You could also try: Code: ls -ld */. which is faster to type (for command line usage) and faster to run (for script usage). "When all else has failed, read the manuals." Denis Upvote 0 Downvote
Beware than mrregan solution will find all directories AND subdirectories, thus is not equivalent to jad solution. You could also try: Code: ls -ld */. which is faster to type (for command line usage) and faster to run (for script usage). "When all else has failed, read the manuals." Denis