user1608776
user1608776

Reputation: 131

How do I list yyyy/mm/dd directories in specified range conveniently in bash?

If it's a single directory, I can use the trick like {yyyymmdd..kkkkkkkk} to select those in range.

But now the date information is contained in three directories,

is there any advanced bash trick that can do this job most conveniently?

Upvotes: 0

Views: 96

Answers (1)

Vaughn Cato
Vaughn Cato

Reputation: 64308

ls -d1 */*/* | awk '$1>="yyyy/mm/dd" && $1<="yyyy/mm/dd"'

Upvotes: 1

Related Questions