Linux Filter commands accept input data from stdin (standard input) and produce output on stdout (standard output). It transforms plain-text data into a meaningful way and can be used with pipes to perform higher operations.
These filters are very small programs that are designed for a specific function that can be used as building blocks.
pipecommand is used by the shell to link the output of one command directly with the input of the other command. The pipe symbol is a vertical bar (|). The syntax is command1 [arguments] | command2 [arguments].
To get the listing of all files and directories, we shall use the command ls -l. Now, this command generally gives a long list of files. In order to get the last line of the output, we have the tail command. Let us add the |, to refine the result from the ls -l command and get only the last line.
The command is ls -l | tail -1 gets the last line.