I use rsync to back up my files using --link-dest
to sync only differences from the last backup folder.
Is there anyway I can see a directory listing ordered by date and restricting it to --max-depth=1
or -d 1
?
For instance, this shows depth of one directory:
$ du -h --max-depth=1
33G ./05-12-2021-16:00
4.7G ./05-12-2021-12:30
4.6G ./05-12-2021-11:30
11G ./06-12-2021-13:30
4.8G ./06-12-2021-02:00
19M ./06-12-2021-08:58
4.7G ./05-12-2021-21:00
938M ./05-12-2021-02:11
754M ./05-12-2021-19:00
32M ./06-12-2021-02:30
179M ./05-12-2021-13:30
172M ./05-12-2021-17:30
4.7G ./05-12-2021-22:00
752M ./05-12-2021-20:00
170M ./05-12-2021-17:00
4.7G ./06-12-2021-12:01
934M ./05-12-2021-12:00
38M ./05-12-2021-14:00
175M ./06-12-2021-12:31
34M ./05-12-2021-18:00
388M ./05-12-2021-16:30
42M ./06-12-2021-14:01
4.7G ./05-12-2021-00:54
756M ./06-12-2021-11:33
173M ./06-12-2021-00:31
4.5G ./06-12-2021-15:31
31M ./06-12-2021-00:00
1007M ./05-12-2021-23:01
762M ./05-12-2021-22:30
31M ./05-12-2021-21:30
765M ./06-12-2021-15:01
214M ./05-12-2021-10:44
32M ./06-12-2021-01:30
33M ./06-12-2021-13:00
27M ./05-12-2021-15:00
166M ./05-12-2021-11:00
32M ./06-12-2021-01:01
176M ./05-12-2021-02:30
27M ./05-12-2021-15:30
30M ./05-12-2021-18:30
37M ./05-12-2021-13:00
31M ./05-12-2021-20:30
753M ./05-12-2021-23:30
752M ./05-12-2021-19:30
43M ./06-12-2021-14:30
38M ./05-12-2021-14:30
91G .
Using the answer here, it sorts by size, but recurses fully into each directory:
$ command ls -dt */ | while IFS= read -r dir; do du -sh "$dir"; done
33G 05-12-2021-00:54/
33G 05-12-2021-02:11/
33G 05-12-2021-02:30/
33G 05-12-2021-10:44/
33G 05-12-2021-11:00/
33G 05-12-2021-11:30/
33G 05-12-2021-12:00/
33G 05-12-2021-12:30/
33G 05-12-2021-13:00/
33G 05-12-2021-13:30/
33G 05-12-2021-14:00/
33G 05-12-2021-14:30/
33G 05-12-2021-15:00/
33G 05-12-2021-15:30/
33G 05-12-2021-16:00/
33G 05-12-2021-16:30/
33G 05-12-2021-17:00/
33G 05-12-2021-17:30/
33G 05-12-2021-18:00/
33G 05-12-2021-18:30/
33G 05-12-2021-19:00/
33G 05-12-2021-19:30/
33G 05-12-2021-20:00/
33G 05-12-2021-20:30/
33G 05-12-2021-21:00/
33G 05-12-2021-21:30/
33G 05-12-2021-22:00/
33G 05-12-2021-22:30/
33G 05-12-2021-23:01/
33G 05-12-2021-23:30/
33G 06-12-2021-00:00/
33G 06-12-2021-00:31/
33G 06-12-2021-01:01/
33G 06-12-2021-01:30/
33G 06-12-2021-02:00/
33G 06-12-2021-02:30/
23G 06-12-2021-08:58/
33G 06-12-2021-11:33/
33G 06-12-2021-12:01/
33G 06-12-2021-12:31/
33G 06-12-2021-13:00/
33G 06-12-2021-13:30/
33G 06-12-2021-14:01/
33G 06-12-2021-14:30/
33G 06-12-2021-15:01/
33G 06-12-2021-15:31/
33G 06-12-2021-16:03/
What I need, is the answer to this question, but ordered by time / date.
I've had a look at the answers here, but I can't see anything helpful:
https://superuser.com/questions/147027/how-can-i-sort-the-output-of-ls-by-last-modified-date
Is there any du (disk usage) command flag that summarizes the size for each sub-directory
https://stackoverflow.com/questions/37272935/unix-command-size-of-directory-with-order-by-size
How to recursively find the amount stored in directory?