I've got a /tmp/test directory. In it I've got a mixture of files and directories. One of those directories is /tmp/test/to_be_kept. Now I'd like to know how do I delete all the files and directories apart from /tmp/test/to_be_kept and everything what's in it? Thanks
|
| |||
|
feedback
|
|
This will produce some error messages which you can ignore when it tries to re-access directories that have already been removed:
| |||
|
feedback
|
Always test the output first! Try these first without the | |||
feedback
|