Created
January 6, 2025 02:24
-
-
Save ZenLiuCN/956e2281473fe5c2c4bf60fd34f5d44a to your computer and use it in GitHub Desktop.
scripts for purge maven build caches (target folder)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for /f "tokens=*" %%G in ('dir /b /s /a:d "classes*"') do del /Q /S %%G | |
for /f "tokens=*" %%G in ('dir /b /s /a:d "test-classes*"') do del /Q /S %%G | |
rem for clean full target folders | |
:: for /f "tokens=*" %%G in ('dir /b /s /a:d "test-classes*"') do del /Q /S %%G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find "./" -type d -name "classes" -path "./**/target/**" | while read -r file; do | |
echo purify $file | |
rm -rf $file | |
done | |
find "./" -type d -name "test-classes" -path "./**/target/**" | while read -r file; do | |
echo purify $file | |
rm -rf $file | |
done | |
## for clean full target folders | |
# find "./" -type d -name "target" -path "./**/**" | while read -r file; do | |
# echo purify $file | |
# rm -rf $file | |
# done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment