I'm trying to create a sh to remove the contents of Xcode's deriveddate folder. I wrote this, it goes to the desired folder, and list the content, but when I remove the # and try to delete it, than it says
"**line 1: =~/Library/Developer/Xcode/DerivedData/: No such file or directory
Desktop Downloads Movies Pictures clitools.dmg
Documents Library Music Public
override r--r--r-- dajkaferenc/staff for Desktop/Christmas Game update/.git/objects/00/8b8026f772525ccff6c3361ecc6f3eb43d0d82?** "
$DIR="~/Library/Developer/Xcode/DerivedData/"
cd $DIR
ls
#rm -r -- "$DIR"*
~
inside the quotes. Shell doesn't expand that.$
before the variable name.Try this:
DIR=~/Library/Developer/Xcode/DerivedData/
cd $DIR
ls
rm -r -- "$DIR"*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With