add rm-targets script

This commit is contained in:
arnaucube
2024-01-22 22:49:44 +01:00
parent 7e951043b5
commit 292bf2b2db

16
bin/rm-targets Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#
# Script to remove all 'target' subdirectories. Used to get back disk space
# from unused rust repos.
echo "current dir size:"
du -hs
echo ""
echo "removing subdirs:"
find . -type d -name "target" # find & print
find . -type d -name "target" -exec rm -rf {} + # find & rm
echo ""
echo "dir size after removing all 'target' subdirs:"
du -hs