Viewing files with cat, more, less, head, and tail



Practical tools such as cat, less, and head are convenient for viewing text.

You don’t always need to launch an editor to view text files at the console. More often than not, a simple viewer is far quicker. But the programs we will be looking at in this month’s issue have a lot more tricks up their sleeves. If you are looking for a fast approach to concatenating multiple files in a single file, cat is the tool you need. This article also looks at tips for the more and less pagers, showing you more convenient approaches to using these tools. And if you are just interested in grabbing the first or last few lines of a file, head and tail are the tools you need. Catwalk

cat lets you output a text file via standard output:

Read full article as PDF:

Command_Line_File_Viewers.pdf (39.46 kB)

Related content

  • Command Line: Viewing Files

    If you just want to peek into a text file, Linux has an abundance of commands to satisfy your curiosity.

  • Command Line: Archives

    Gzip and bzip2 not only compress files, they also provide lean and powerful tools for viewing, searching, and comparing text files.

  • Command Line: File Management

    Once you’ve mastered the everyday commands for manipulating files, you might want to do more. We show you some powerful commands for advanced file management.

  • Command Line: Diffutils

    The Diffutils tool set helps you compare text files, discover and display the differences between files, and even automatically synchronize files.

  • Admin Workshop: Documentation

    System admins routinely refer to documentation for help with obscure command line options. In this month’s Admin Workshop, we examine the programs and formats behind the command line documentation you read everyday.

comments powered by Disqus

Direct Download

Read full article as PDF:

Command_Line_File_Viewers.pdf (39.46 kB)


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia