Linux Recursive Delete Keeping The First Dir

directorylinuxrecursive

First question here, I'm usually on StackOverflow.

I need to delete all the contents of a directory, but not the directory itself as I don't have permission to delete that actual directory. This seems simple, but I'm unable to find the command for this. Thanks in advance.

Best Answer

rm -r /path/to/directory/*

or

rm -rv /path/to/directory/*

if you want to see what is happening.