Linux less command

When going through large text files usually the Linux cat command won’t do. This is where you can use the Linux less command instead. It is more of a predecessor and there are several jokes on the theme. This is featured on the cover of “Unix and Linux System Administration Handbook” and there’s also the joke: “I though you were more of a guy/gal”. We’ll show some basic usage of the Linux less command in this article.

Using less to view file’s contents

less myTextFile.txt

Using less as a pipe from output

cat largeTextFile.txt | less

While in less you’re actually in a different “mode” so to say, there are many shortcuts you can use to navigate back and forth, to view them you can use the help page.

Using the Linux less command Help options

less --help

To exit less just press q

  • 0 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

Linux tar Command

The Linux tar command is used to compress and extract files to and from an archive. In this...

Linux file command

The file command is used to check a file’s type and contents in Linux environment. It is most...

Linux export command

When you’re managing your shell’s variables and you wish to save them to your environment you can...

Linux su command

The su command is most commonly used to switch to another user. You will then be able to run...

Linux wc command

If you’re interested in finding the word count or lines of a file in your Linux environment you...

Powered by WHMCompleteSolution