上QQ阅读APP看书,第一时间看更新
How to do it...
Directories in the current path can be displayed in the following ways:
- Use ls with -d to print directories:
$ ls -d */
- Use ls -F with grep:
$ ls -F | grep "/$"
- Use ls -l with grep:
$ ls -l | grep "^d"
- Use find to print directories:
$ find . -type d -maxdepth 1 -print