Or rm -rf dir instead a relative path. Write down the actual path or directory name you want to delete. Do not use only variables for the path. But combining with literals is fine, such as dir/${subdir}/* . One can also test if the directory exists before starting the process, especially useful in scripts. And I recommend using --verbose option to see what is being deleted: test -d dir && rm -rfv dir
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments