Current time: 03-31-2020, 09:25 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to losslessly optimize large pngs. (5MB and bigger)
01-16-2014, 01:08 PM
Post: #10
RE: Need to losslessly optimize large pngs. (5MB and bigger)
I'd refine that slightly...

Code:
cd /tmp/png
nohup (find . -iname '*png' -type f -print0 | xargs -0 --max-procs=4 -n 1 optipng -dir /tmp/png-opt/) &

Use single quotes, otherwise the *png will expand if there are any files present that would match in the current directory, and you''ll only get a part of what you expect
-type f to ignore any directories, sockets, etc that end in png
nohup and brackets so that you can set it off when you leave the office, log out, and it'll be finished in the morning.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Need to losslessly optimize large pngs. (5MB and bigger) - GreenGecko - 01-16-2014 01:08 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)