Police have charged 260 people and seized 54 knives and weapons during a month-long crackdown across Sydney public transport, including two knives allegedly found on a 12-year-old girl.

Officers conducted the operation throughout October, targeting anti-social behaviour, knife crime, drug offences and people wanted by police.

The operation, involving officers from multiple transport command sectors, focused on Penrith, Mount Druitt, Blacktown, Parramatta and Quakers Hill.

Police patrolled 655 trains and 52 buses between October 1 and 31, conducting 988 searches and issuing 245 move-on directions.

They also recorded 147 drug detections, conducted 31 Apprehended Domestic Violence Order compliance checks and carried out 109 bail compliance checks, identifying two breaches.

Among the incidents, a 33-year-old man was arrested at Blacktown Railway Station on October 1 after police allegedly found more than 90g of methylamphetamine during a search.

He was charged with supplying and possessing a prohibited drug and refused bail ahead of his next court appearance on December 7.

A 32-year-old man was arrested at Mount Druitt Railway Station on October 11 after police allegedly found a self-loading pistol and a knife with a 6cm blade.

He was charged with possessing an unauthorised pistol and a knife, and also refused bail ahead of a December 7 court appearance.

In another incident, a 12-year-old girl was searched at Blacktown Railway Station on October 24, with police allegedly seizing two knives with modified handles and housebreaking implements.

She was dealt with under the Young Offenders Act and returned to her parents.