Listing only directories in UNIX

前端 未结 20 886
青春惊慌失措
青春惊慌失措 2020-12-12 09:40

I want to list only the directories in specified path (ls doesn\'t have such option). Also, can this be done with a single line command?

20条回答
  •  孤城傲影
    2020-12-12 10:17

    In order to list the directories in current working directory ls -d */ can be used. And If you need to list the hidden directories use this command ls -d .*/

提交回复
热议问题