views:

707

answers:

2

how do we extend a command to next line?

basically whats the windows alternative for linux's

ls -l \
/usr/

here we use backslash to extend command on next line

whats the equivalent for windows?

+5  A: 

After trying almost every key on my keyboard:

C:\Users\Tim>cd ^
Mehr? Desktop

C:\Users\Tim\Desktop>

So it seems to be the ^ key.

Timbo
You learn something new every day!
anon
+4  A: 

In the Windows Command Prompt the ^ is used to escape the next character on the command line. (Like \ is used in strings.) Characters that need to be used in the command line as they are should have a ^ prefixed to them, hence that's why it works for the newline.

For reference the characters that need escaping (if specified as command arguments and not within quotes) are: &|()

Daemin