Remove Certain Files/Dir from Large Dir
Before we continue, we are going to assume we only have CLI access to this machine.
Lets say from the CLI I accidentally untar a huge archive into another large directory such as, / for example. Lets also say that now in / there is a huge list of random directories and files. Aside from manually hunting down and deleting every one, what is the best way to remove these files without touching the rest of the standard directory structure?
I was assuming I could somehow extract the archive to its own directory, perform a ls and pipe it to a document and use that document to rm -r the / directory.
Is this possible? Anyone have a solution to a situation like this?