How to cut posts off an iron bed
In general, if you're looking to keep things clean, a pipe cutter would be the least messy.  If you want to keep tool purchases cheap, and can handle a little mess, then a hacksaw would likely work.

All that being said.  If you want to put the bed knobs back on after you're done, you might find that you have to do some welding/brazing.  If the bed knobs screw in, then there's likely a threaded insert inside the post.  Once you shorten the post, you'll have to find a way to remove and refit the insert into the shorter post.  Obviously if the knobs simply slide into the top of the post, then you won't have any trouble at all re attaching them.