ls コマンドのオプションにディレクトリだけ表示するのがあればよかったのに、ないらしい。なので awk と組み合わせた。
takatoh@nightschool $ ls -l . | awk '/^d/ { print $9 }'
Desktop
Documents
Downloads
Dropbox
Music
Pictures
Public
Templates
Videos
bin
lib
tmp
w
takatoh's blog – Learning programming languages.
ls コマンドのオプションにディレクトリだけ表示するのがあればよかったのに、ないらしい。なので awk と組み合わせた。
takatoh@nightschool $ ls -l . | awk '/^d/ { print $9 }'
Desktop
Documents
Downloads
Dropbox
Music
Pictures
Public
Templates
Videos
bin
lib
tmp
w