Fast and label-free techniques to analyze viruses and bacteria are of crucial interest in biological and bio-medical applications. For this purpose, optofluidic systems based on the integration of photonic structures with microfluidic layers were shown to be promising tools for biological analysis, thanks to their small footprint and to their ability to manipulate objects using low powers. In this letter, we report on the optical trapping of living bacteria in a 2D silicon hollow photonic crystal cavity. This structure allows for the Gram-type differentiation of bacteria at the single cell scale, in a fast, label-free, and non-destructive way.