I know I can do this to get a list of directory names:find . -type d -maxdepth 1 The output looks like this:../foo./barI prefer the listing without ./. Is there a way to get find to output just the raw names?I tried sending the list to stat to format it but that just gives me the same result:find . -type d -maxdepth 1 -print0 | xargs -0 stat -f '%N'
Get a list of directory names with find
find;directory