I am trying to execute the following command
ls -d a* | xargs -i sudo rm -rf {}/*
The problem is that when I add the /*
part the command does not work. I want to remove the directory contents (not the directory itself).
shellxargs
I am trying to execute the following command
ls -d a* | xargs -i sudo rm -rf {}/*
The problem is that when I add the /*
part the command does not work. I want to remove the directory contents (not the directory itself).
Best Answer
What about
rm -r a*/*
? This should solve your issue.