It's even easier than all that filing and breaking and stuff... Pick up one and try to pick up the other. The one that will pick up the other is the magnet.
stick one rod to the other
So the two rods attract, yes, we know one is a magnet. The magnetic attraction between the rods is a function only of the distance between them and the power of the magnetic field. Holding the magnet will not increase it's energy flow and reveal it. If the magnet is strong enough to lift the rod off the table, it will also be strong enough to lift itself off the table when passing the rod over it!
I looked at the top post and thought the exact same thing. But after thinking I realized that if you try to pick up the one laying on the ground by the center then only the magnet with be able to if it's poles are at the ends. To make sure they are then you could simply hold one of the bars by it's very end with just two fingers very gently and move it along the other one without letting them touch. If the bar pulls toward the end then that's where the poles are. If it doesn't pull anywhere, switch bars. This could also be used as another solution in itself. Because, if you are holding the magnet then it will pull just as strongly no matter where it is in relation to the bar leying on the ground. If you are holding the non-magnet then it will pull more strongly when you are over the poles. Please correct me if I am wrong. But I am pretty sure this would work.