Sebastian Figura, 32, was detained by police following the incident at St Stephen’s shopping centre on Ferensway.
Figura told police that he had found the knife on a building site that morning and intended taking it home.
Sally Robinson, prosecuting, told magistrates in Hull: “He didn’t have the intention to use the knife to harm anyone. Firearms officers were deployed because it was a great big hunting knife he was in possession of.”
Matthew Coggin, defending, said the incident happened at 9am and appeared “not to be in dangerous circumstances”. He added: “He told police he had found it and intended to take it home with him.”
The court heard Figura, of Airlie Street, Hull, who came to the UK from Poland last June, was in breach of a community order on an unrelated matter of burglary.
Figura was sentenced to 12 weeks in jail in total, with six weeks each for possession of a bladed article and for failing to comply with the community order.
He was also ordered to pay a victim surcharge of £115.