The output format parameter is -O, not -0. Also, there's a - before the path/ which makes samtools thing ath/file_fixmated.bam is the value passed to -p but -p doesn't expect an input parameter. Speaking of, -m doesn't expect an input parameter as well, so I'm not sure what the file_nSorted value is doing there. Also, there's only one positional argument supplied so BAM output is being written to STDOUT. It looks like you did not read the extremely brief manual at all. Please read it and fix all of that - nothing is wrong with your terminal. PEBCAK.