HF RL Explorer

Task: Delete Empty Subdirectories After File Cleanup

Task: Delete Empty Subdirectories After File Cleanup: a task in Terminal-Lego-15k (Harbor dataset). Write a Bash script that removes files older than 30 days from a directory tree, then recursively deletes any subdirectories that become empty as a result — without removing parent directories that…

The task

Write a Bash script that removes files older than 30 days from a directory tree, then recursively deletes any subdirectories that become empty as a result — without removing parent directories that still contain files or non-empty subdirectories.

Part of PrimeIntellect/Terminal-Lego-15k.