Skip to content

Instantly share code, notes, and snippets.

@SimZhou
Created August 1, 2022 03:41
Show Gist options
  • Save SimZhou/abcd23bf8e81d9e8d5070b40b2c09637 to your computer and use it in GitHub Desktop.
Save SimZhou/abcd23bf8e81d9e8d5070b40b2c09637 to your computer and use it in GitHub Desktop.
Write folder size info of curdir into du.<datetime>
#!/bin/bash
# ======================
# To write folder size info into curdir as a file,
# with timestamps.
# ======================
du -d 1 -h | tee "du."$(date "+%Y%m%d_%H-%M-%S")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment