What is the rev command in Linux? What is the rev command? As the name implies, the rev command (short for reverse) allows users to reverse a line of characters or a file. How is the rev command used? The rev command is typically supplied a string of characters or a file input. rev with a file If a file named example.txt contains: 1This is a line of text 2txet fo enil a si siht 3another oneand rev is supplied example.