Once in a while I need a bolt of exactly the right length and it is not one of the lengths available in stores. So I get a longer bolt and cut it to length. Here's the procedure I follow.
I screw one or several nuts onto the bolt so that they are between the bolt head and the future cut. Then I grip the bolt in a vise and cut it with a hacksaw. Then I trim the edges with a file to get them to something like 45 degrees. Finally I ungrip the bolt and unscrew the nuts and that cleans the threading of any loose metal.
What I don't like is trimming the edges requires a lot of tedious work and usually the edges won't be as clean as they were on the original bolt and so the bolt will sometimes get stuck when I start to screw a nut onto it and I'll have to remove the nut and try to screw it again. This it not a problem when the connection is to be permanent, but is definitely a problem when it has to be disconnected and connected back rather often.
Also it's quite problematic to have a cut perfectly orthogonal to the bolt axis because the threading helps the saw blade to slightly drive away. This is not a major problem, but still would be better to avoid.
Is there a more efficient procedure for cutting bolts to length that would yield cleaner edges and more precise cuts?