Skip to content

Instantly share code, notes, and snippets.

@gnyman
Created December 7, 2022 19:12
Embed
What would you like to do?
Hi, we're solving advent of code together. I need your help to produce code to solve the problems. I prefer python and I prefer to provide the filename as an argument on the command line like.
The problem is as follows, given the output from a terminal like this
$ cd /
$ ls
dir a
14848514 b.txt
8504156 c.dat
dir d
$ cd a
$ ls
dir e
29116 f
2557 g
62596 h.lst
$ cd e
$ ls
584 i
$ cd ..
$ cd ..
$ cd d
$ ls
4060174 j
8033020 d.log
5626152 d.ext
7214296 k
calculate the total size of each of the directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment