Skip to main content
deleted 101 characters in body; edited tags
Source Link
Santosh Kumar
  • 4.2k
  • 7
  • 30
  • 36

I'm in a directory where running tree command produces something like this:

├── directory1
│   └── image_sequence
│       ├── image.0001.jpg
│       ├── image.0002.jpg
│       ├── image.0003.jpg
│       ├── image.0004.jpg
│       ├── image.0005.jpg
│       └── image.0006.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

The image sequence inside image_sequence produces a large listing that I want to trim. My desired output is something like below:

├── directory1
│   └── image_sequence
│       └── image.####.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

UseCan the output of Python is allowed. But I thought why not use tree command.

(I'm in a restricted environment so I can't install external library) somehow be modified?

I'm in a directory where running tree command produces something like this:

├── directory1
│   └── image_sequence
│       ├── image.0001.jpg
│       ├── image.0002.jpg
│       ├── image.0003.jpg
│       ├── image.0004.jpg
│       ├── image.0005.jpg
│       └── image.0006.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

The image sequence inside image_sequence produces a large listing that I want to trim. My desired output is something like below:

├── directory1
│   └── image_sequence
│       └── image.####.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

Use of Python is allowed. But I thought why not use tree command.

(I'm in a restricted environment so I can't install external library)

I'm in a directory where running tree command produces something like this:

├── directory1
│   └── image_sequence
│       ├── image.0001.jpg
│       ├── image.0002.jpg
│       ├── image.0003.jpg
│       ├── image.0004.jpg
│       ├── image.0005.jpg
│       └── image.0006.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

The image sequence inside image_sequence produces a large listing that I want to trim. My desired output is something like below:

├── directory1
│   └── image_sequence
│       └── image.####.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

Can the output of tree command somehow be modified?

edited title
Link
Santosh Kumar
  • 4.2k
  • 7
  • 30
  • 36

Shorten How to shorten image sequence output in tree command?

Source Link
Santosh Kumar
  • 4.2k
  • 7
  • 30
  • 36

Shorten image sequence output in tree command

I'm in a directory where running tree command produces something like this:

├── directory1
│   └── image_sequence
│       ├── image.0001.jpg
│       ├── image.0002.jpg
│       ├── image.0003.jpg
│       ├── image.0004.jpg
│       ├── image.0005.jpg
│       └── image.0006.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

The image sequence inside image_sequence produces a large listing that I want to trim. My desired output is something like below:

├── directory1
│   └── image_sequence
│       └── image.####.jpg
│ 
└── directory2
    ├── somefile.ext
    └── someanotherfile.ext2

Use of Python is allowed. But I thought why not use tree command.

(I'm in a restricted environment so I can't install external library)