LoginSignup
4
5

More than 5 years have passed since last update.

linux > フォルダの一覧を改行なしで見たい > ls -d */ や ls -d */*/

Last updated at Posted at 2015-03-13

動作確認

CentOS 6.5

今いるフォルダのサブフォルダ一覧をターミナルの画面スクロールなしに見たい。でも、いろいろファイルやフォルダがありすぎて、lsコマンド(オプションなし)では見にくい時

$ ls -F | grep / | xargs
DATA/ SRC/ SRC.bk/ 



(追記 15/03/17)
コメントでfabiiw05さんに教えていただいたこちらの方が簡単で覚えやすい。
ls -d */

さらに以下のようにすると、今いるフォルダの1つ下のフォルダが一覧となって表示される。

ls -d */*/
A/AB/  A/AC/  A/AD/  B/BA/  B/BB/  B/BC/  C/CA/
4
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5