Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Remove passwords from edit-restricted PDFs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Remove passwords from edit-restricted PDFs
Authored by: CarlRJ on Feb 26, '10 07:40:09PM
My first thought was, you could fold the grep into the sed and save one command, but then I realized that xargs could simplify things and handle multiple files in the queue as well:
sudo -s "cd /var/spool/cups; /usr/sbin/chown -v `id -u`:`id -g` d* | xargs -I@ mv -iv @ ~/Desktop/nopassword_@.pdf"
I think it's also preferable to have the file end up owned by the user, instead of them merely having read access to it.

[ Reply to This | # ]