Linux – What does an arrow (“->”) symbol mean on the command line

command linelinuxmacmacosterminal

I'm working with Terminal (Mac OS X), but I think this is a built-in part of Linux. Sometimes, when I execute a command, Terminal returns a new, indented line with just -> on the line. It seems like it's waiting for something, but I don't know if it requires action on my part or not. Pressing enter simply returns another, identical line. When I Ctrl + C, it says Aborted, meaning something was clearly processing. What does this mean? For example, the following:

$ mysql -u root -h host -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is X
Server version: 5.1.39-log MySQL Server

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> mysqldump my_database
    -> 
    -> [Ctrl + C]
    -> Aborted
$

Edit: Seems this is faulty syntax for the command, but I'm not sure that is the reason for the arrows.

Best Answer

In the MySQL command-line tool that means the tool expects your input to continue on the next line. Here it is waiting for the destination path.

Common "full" SQL commands are written with indents, which is supported at the command line. You would say something like

SELECT
    `users`.*
FROM
    `users`
WHERE
    `users`.`is_active` = 1 AND
    `users`.`age` < 13
ORDER BY
    `users`.`username`
Related Question