The command rosbag record -h will output a description of the optional arguments. Take a look at the one called --limit.