Hi, I think this is what you are looking for, adjust the value of X for the output of "few". history | tail -X >file.txt Harry Christopher Robbins wrote: >Is there a way to grep the last few commands I've done and print them out or >pipe them to a file? > >Thanks > >-Chris > > >