In older day, sailors used to find direction by suspending a piece of dash.
Hello Mehnaz,
Yes, During the olden days, when the compass was not developed to find direction, the sailors used to find the direction using a bar magnet. They used to suspend it freely with the help of a thread and find the direction when they travel. They always keep the bar magnet with them while travelling.
Hope it helps.
Good Luck!