Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI 010-160 Exam - Topic 1 Question 63 Discussion

Actual exam question for LPI's 010-160 exam
Question #: 63
Topic #: 1
[All 010-160 Questions]

When typing a long command line at the shell, what single character can be used to split a command across multiple lines?

Show Suggested Answer Hide Answer
Suggested Answer: A

The backslash character () is used to escape the meaning of the next character in a command line. This means that the next character is treated as a literal character, not as a special character. For example, if you want to use a space in a file name, you can use a backslash before the space to prevent the shell from interpreting it as a separator. Similarly, if you want to split a long command line across multiple lines, you can use a backslash at the end of each line to tell the shell that the command is not finished yet. The shell will ignore the newline character and continue reading the next line as part of the same command. For example, you can write:

ls -l

/home/user/Documents

instead of:

ls -l /home/user/Documents

Both commands will produce the same output, but the first one is easier to read and type.Reference:

Linux Essentials - Linux Professional Institute (LPI), section 2.1.2

2.1 Command Line Basics - Linux Professional Institute Certification Programs, slide 7.


Contribute your Thoughts:

0/2000 characters
Josefa
1 day ago
I think it's the backslash character, right? I remember it being used to continue commands in the shell.
upvoted 0 times
...

Save Cancel