[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Get directories names



Incoming from Alex Malinovich:
> On Tue, 2004-11-09 at 17:09 -0500, Tong wrote:
> > 
> > I used to use the following command/alias to get the names under the
> > current directory in RH:
> > 
> > ls -l <criteria> | grep ^d | cut -c57-
> > 
> > but in Debian, the position of the file name is not fixed. 
> > 
> > How do you get it? Thanks
> 
> To get a list of directories in the CURRENT directory, just do:
> 
> ls -d */

find . -type d -print           # shows every directory from cwd down

find ./dir -type d -print       #   "    "       "       "   ./dir "


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)    http://www.spots.ab.ca/~keeling      Please don't Cc: me.
- -



Reply to: