Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

rev command in Linux with Examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

rev command in Linux is used to reverse the lines characterwise. This utility basically reverses the order of the characters in each line by copying the specified files to the standard output. If no files are specified, then the standard input will read.

Syntax:

rev [option] [file...]

Example 1: Taking input from standard input

Example 2: Suppose we have a text file named as sample.txt

Using rev command on sample file. It will display the result on the terminal as follows:

Options:

  • rev -V: This option display the version information and exit.
    rev -V

  • rev -h: This option will show the help message and exit.
    rev -h

My Personal Notes arrow_drop_up
Last Updated : 24 May, 2019
Like Article
Save Article
Similar Reads