The attack happened outside of 1 Centre Street just after 11:30 a.m. Wednesday.
The victim is a Brooklyn resident and was waiting to go to court to answer a summons.
He told detectives he was talking to a woman in line when the suspect came up behind him and slashed him.
The suspect stabbed him in the lower neck and upper back and fled toward Centre Street.
The victim was taken to the hospital where he is expected to survive.
He told police he did not recognize the suspect.
Marvin Dupree was spotted late Wednesday afternoon as police scoured their area looking for the suspect.
Officers were armed with images from multiple pieces of surveillance video of him walking through the area, as the stabbing occurred in the vicinity of several municipal buildings.
Dupree, of Hamilton Heights, was charged with attempted murder and assault.
Dupree has seven prior arrests, mostly for drug possession and sales.
ALSO READ | NYPD says migrant children behind several violent crimes near Times Square
NYPD says migrant children are behind several violent crimes near Times Square
----------
* Get Eyewitness News Delivered
* More Manhattan news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube