configs/bin/rm-targets
bin/rm-targetsRaw
1#!/usr/bin/env bash
2#
3# Script to remove all 'target' subdirectories. Used to get back disk space
4# from unused rust repos.
5
6echo "current dir size:"
7du -hs
8echo ""
9
10echo "removing subdirs:"
11find . -type d -name "target" # find & print
12find . -type d -name "target" -exec rm -rf {} + # find & rm
13
14echo ""
15echo "dir size after removing all 'target' subdirs:"
16du -hs