how to delete directory when resourse is busy code example Example: device or resource busy lsof +D /path kill -9 $PID