Skip to content

Instantly share code, notes, and snippets.

View r-walloner's full-sized avatar

Robin Walloner r-walloner

  • University of Stuttgart & SDV STUDIOS
  • Stuttgart area, Germany
View GitHub Profile
@r-walloner
r-walloner / analyze.sh
Created July 12, 2023 19:50
analyze.sh
#!/bin/bash
# Directory to analyze
directory="/path/to/directory"
# Initialize an associative array to store the storage per year
declare -A storage_per_year
# Loop through all files in the directory
find "$directory" -type f -exec stat --format "%Y %s" {} \; | while read -r timestamp size; do