I recently installed 7zip on my PC to extract some .7z files I had in my Download Folder. However, when I entered:
7z e 'File location here'
The terminal result:
?????????? ?? ??
???????: ???
?????: ????
All the 1700 files were extracted successfully, but also went to the /home folder flooding it.
I desperately start deleting some of the files and folders, but it's imposible to manually remove all of them.
Also tried sorting by date, but the files have dates from 2014 to 2020 inherited by the original .7z file.
Is there a method to undo what I did without damaging any of the files I already had before the extraction?
Get the list of extracted files, then script a deletion work.
List files in archive
The output of this command looks like the code bellow:
We want the list of files with path
Get the last column by deleting the 53 first characters, adapt it to your output if needed
This could also be achieved with awk and dealing with spaces
Optionnal removing heading and tailing lines
Save the files list to a text file
You will be able to script the deletion of the unwanted files
Adapt 17 heading and 2 tailing values to your output if needed