Today I was looking at this CD we got from a photographer. She put each picture on it in color and black and white. I want to upload the CD for family to see but if they want black & white I think they can do that easily enough themselves. So for kicks I wanted to know how many MegaBytes this was going to be. Welcome to the world of Linux where there is a way to do this without cut & paste for an hour. I use the following line of code to learn that instead of 199MB for everything, it will be 110MB. I knew it would be more than half because the color photos would use more memory, but I was glad to see that it was close to only half. Mostly I was just happy to have found a new use for awk.
ls -l /media/100526_0814/IMG_8[123][0-9][0-9]\.jpg|awk '{sum+=$5}END{print sum}'
3 comments:
"..because the color photos would use more memory". I think you mean disk space.
Yeah, Johnner, cuz everyone is a flaming pedant out to prove how smart he is. Go eat a pickle.
Thatsup
www.Thatsup.info
Thatsup.info
Post a Comment