more command

more command is used for retrieving analysis of text data in the file, it takes big size file and displays it in page format and one important thing we need to note is, page down and page up keys do not work and we need to click on enter key for the display of new records on screen. To apply more command and view its working functionality, we need to take any system folder on Linux Machines that contain a huge set of text data. For this reason, I have chosen /var/log/messages folder. 

Syntax of more command:

more [-options] [-num] [+/pattern] [+linenum] [file_name]

what is /var/log/messages ? 

/var/log/messages is a system-managed folder in Linux that contains all system messages and notifications recorded at System Boot, This folder has all logs of mail, kernel, auth, daemon, etc. 

Sample code: 

cat /var/log/messages | more 

Output: 

 

Explanation: 

Here we can see the output as static text data representing a complex chunk of the input text data, in contrast, if we use the normal cat /var/log/messages command, we will see a continuous running logs output dynamically, we cannot capture that output in a picture and show you here, but you can try it useful with above-mentioned command, surely you would notice the difference and also please note that we have a “more” option, by clicking enter we can see the continuation of the output data. 

Useful Commands For Filtering Text for Effective File Operations in Linux

In this article, let us learn about different commands used in Linux for filtering text to implement effective file operations on Linux Machines.

Similar Reads

What is a filter in Linux?

In Linux Operating System, Filters act as a specialized program to get desired output from the client/user by taking the help of other files and pipes to perform a series of operations for the specified results. This helps in processing information in an effective way for desired output generation....

pr command

pr command helps in generating the input in a printable format, with a properly defined column structure....

tr  command

tr command is used, for translation or deletion of input string data, and also we can change the case of letters from upper to lower and vice versa. It helps in formatting the case of text data whenever needed....

find command

The find command can be used as a filter to search files seamlessly on the server console in Linux Machines, given on one condition that users are aware of the file name for which they are applying this filter command in Linux Machines....

uniq command:

The uniq command is used for filtering out the unique characters from a file containing duplicate input data....

sort command

The sort command is used for sorting the text data in ascending order....

grep command

The Grep command will extract the matched string data from the target file....

sed command

sed Command, used for filtering and transforming complex data, acts as a powerful stream editor and is mostly applied in the shell or dev jobs for filtering out complex data. Using the sed command we can retrieve only the required lines of input text data by specifying the required index value....

fmt command

fmt command is a Linux Filtering Command, which helps in reformatting input data and printing it with the result of standard output....

more command

more command is used for retrieving analysis of text data in the file, it takes big size file and displays it in page format and one important thing we need to note is, page down and page up keys do not work and we need to click on enter key for the display of new records on screen. To apply more command and view its working functionality, we need to take any system folder on Linux Machines that contain a huge set of text data. For this reason, I have chosen /var/log/messages folder....

less command

The working of less command is similar to that of more command but the only difference is the less command will display much faster in speed the desired output for which applied and also page up and page down option exists for the less command which is not in the case of more command discussed in above lines....

Contact Us