I accidentally typed
7z e archive.7z
and all the files ended up in my home directory when I wanted to extract them in a subfolder. How can I clean the mess and remove all those files?
Looking at this answer and that one in particular, I ended up running this command which removed all the unwanted files:
7z l archive.zip | awk ' {print $6} ' | awk '
function basename(file) {
sub(".*/", "", file)
return file
}
{print basename($1)} ' | xargs rm -rf