Yes, that is possible. I gather you have found the Osmosis pages in the osm wiki already? Lot’s of detailed usage information in there…

On a sidenote, you do not need to uncompress the planet first. Osmosis works fine with the bz2 archived planet dump which requires much less disk space (but it’s a little bit slower to process the planet).