Browse Source

add rm-targets script

master
arnaucube 11 months ago
parent
commit
292bf2b2db
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      bin/rm-targets

+ 16
- 0
bin/rm-targets

@ -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

Loading…
Cancel
Save