how to view the contents of a text file in linux code example Example: view file linux command line cat filename #for short files less filename #for longer files