Greater than

Greater thanAlternatively referred to as an angle bracket or more than, the greater than is a symbol ( > ) that is found on all computer keyboards, commonly on the same key as the period on U.S. keyboards. The greater than symbol resembles an arrow pointing to the right and is commonly used in math and computer programming.

How is the greater than used?

With computers, the greater than is often seen on the command line prompt. Below are two examples of command line prompts using the greater than symbols.

MS-DOS prompt:

Linux and Unix prompt:

Below is an example of how the greater than could be used in math. In the example below, the statement is showing that 10 is greater than 2.

10 > 2

The next example below, is using the greater than as an append symbol to append text to a file in the Windows command line.

echo this is an example > test.txt

Finally, below is an example of how the greater than could be used in computer programming. In this example, the if statement is performed if the variable $myvalue is greater than 100. If the variable was less than 100, this section of code would be skipped.

if ($myvalue > 100) {
print "More than 100.\n";

Tip: The wide edge of the greater than symbol always faces the larger number. So with 5 > 1 it's easy to see five is greater than one.

How to create the greater than

Creating the > symbol on a U.S. keyboard

To create this symbol using a U.S. keyboard hold down the Shift key and press the comma key, which is above the right-hand side of the space bar on the keyboard.

Creating the > symbol on a smartphone or tablet

To create this symbol on a smartphone or tablet open the keyboard and go into the numbers or symbols (sym) section and then press your finger on the # symbol and then tap on the > key.

Related pages

Also see: GT, Keyboard terms, Less than, Redirect