The result was a little harsh on Longford, who remain bottom of the table without a win now since the opening night of the season, as they had teenage defender Tristan Noack-Hofman sent off in the first half before which they looked relatively comfortable.
While the first half performance from Cork was down the gears, the second was much better with the result, and clean sheet - their fifth in six league games - setting up nicely Friday’s visit of champions Dundalk to Turner’s Cross.
“It’s a really good win for us on a blistering hot day on a rock hard pitch,” said City manager John Caulfield.
“It was going to be a tricky game for us. You could see that Longford defended really well and they were difficult to break down.
“The sending off made it worse as they got nearly everyone behind the ball.
“We were sluggish even though we had so much of the ball. That can happen in games.
“At half-time we decided to jig things up and Mark came in and there is no doubt he changed the game.
“Friday is a huge game. The way this league is shaping up, there is no-one to challenge Dundalk only us.”
Struggling Longford, conscious of their 6-0 drubbing at Cork back in March, played with five at the back, and weren’t far off the ideal start with a chance inside two minutes.
Striker Lee Duffy, scorer of a cracking goal in the FAI Cup in Waterford last week, cut in from the left to fire a powerful shot over the bar.
Cork settled to enjoy plenty possession, with Sean Maguire shooting straight into the arms of Paul Skinner before Gavan Holohan sliced badly wide from Kevin O’Connor’s pull back.
The visitors then wasted the best chance of the first half on 23 minutes.
Steven Beattie put O’Connor’s cross back across goal for Stephen Dooley. But the winger mishit his attempted shot which came to Alan Bennett who planted his header over Skinner’s crossbar.
Having generally held their own, Longford were dealt a blow on 34 minutes when 17-year-old central defender Noack-Horman was sent off for a foul on Beattie, his second yellow card offence.
A brave block on the edge of the are by Mark Rossiter on Bennett’s shot from skipper Greg Bolger’s resulting free kick kept Cork out.
Pat Flynn then got his body in the way of Dooley’s powerful drive after a mistake by Philip Gannon gifted the Cork player the ball in the box.
With O’Sullivan on, it was pretty much one-way traffic from the resumption with Cork’s pressure finally telling on 57 minutes.
McNulty’s clearance was flicked on by O’Sullivan for Maguire to pounce on a miskick by Rossiter to flick a right-foot lob past Skinner to the net.
Skinner then kept Town in the game with terrific saves from O’Sullivan and then Maguire.
Once again Skinner was there to make perhaps the stop of the game from O’Sullivan before the Cork striker doubled the lead on 73 minutes when meeting Kevin O’Connor’s free kick with a near post header.
O’Connor and Maguire then combined to set up Dooley to drill home the thrid goal seven minutes from time.
Skinner; J. Mulhall, Flynn, Rossiter (Gorman, 75), Noack-Hofman, Powell; Gannon, Dillon; Duffy (O’Hanlon, 65), Simon (Cowan, 70), O’Sullivan.
McNulty; Healy (O’Sullivan, h-t), McSweeney, Bennett (Turner, 78), O’Connor; G. Morrissey, Bolger (Buckley, 61); Beattie, Holohan, Dooley; Maguire.
Derek Tomney (Dublin).