The potential advantages of cell-based biohybrid devices over conventional nonliving systems drive the interest to control the behavior of the underlying biological cells in microdevices. Here, the authors studied how shear influenced the geometry and elongation of fimbriated filaments on affinity substrates. The cells were engineered to express FimH, which binds to mannose with a high affinity. A microfluidic channel was functionalized with RNAse B, which is rich in mannose residues, and the device was used to control the hydrodynamic force on live Escherichia coli under filamentous growth. It was discovered that filamentous E. coli cells adopt buckled geometry when the shear rate is low, but assume an extended geometry at high shear and align with the flow direction. The extension moves from bidirectional to preferentially downstream as the shear rate increases. Furthermore, living filaments slide easily on the substrate, and detach from the substrates at a rate nearly ten times greater than unfilamented live E. coli at high shear conditions (1000-4000 s). The hydrodynamic force and binding force experienced by the cells are further analyzed by COMSOL simulation and atomic force microscopy measurements, respectively, to explore the mechanism behind the living cell dynamics. Knowledge from this work helps guide design of interfacial properties and shear environments to control the geometry of living filamentous bacteria.