If this is your first visit, be sure to
check out the FAQ. You will have to register
before you can post. To start viewing messages,
select the forum that you want to visit from the selection below.
Please do not use the CODE tag when pasting content that contains formatting (colored, bold, underline, italic, etc).
The CODE tag displays all content as plain text, including the formatting tags, making it difficult to read.
find . -type f -name 'nvidia*' -exec zip -mT junk-nvidia-files.zip {} +
@dibl,
I put a bit more thought into it, and this will be more robust. It should prevent any potential errors from passing hundreds of very long filenames on a single command line.
Code:
sudo sh -c "find -name 'nvidia*' | zip -mT nvidia-junk.zip -@"
The sudo sh -c "..." syntax invokes sh for a single command line with super user privileges. It has to be done this way because Bash breaks unquoted pipes.
The -@ tells zip to accept the list of files from standard input instead of command line arguments
If you don't want zip to print file names then you can quiet it with the -q option.
Code:
sudo sh -c "find -name 'nvidia*' | zip -mqT nvidia-junk.zip -@"
Comment