Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Select all of the following statements that true: Question options: Executing

ID: 2247555 • Letter: 1

Question

1) Select all of the following statements that true:

Question options:

Executing the cd command with no option/argument does nothing.

Commands entered separately - each on its own line - work the same way as commands separated by semi-colons, ';' characters.

The a option is passed to the ls command to tell ls to output information about all files in the current directory including files that are hidden by default. The loption is passed to the ls command to tell ls to output extra information (a "long" listing) about files in the current directory.

The pwd command outputs ("prints") the current working directory.

The commands, cd; pwd; ls -la, are executed from left to right. The pwd command does not run until the cd command has finished running. The ls -la command does not run until the pwd command has finished running.

Executing "cd ~" without the quotes produces a different result than executing cd with no option/argument.

a)

Executing the cd command with no option/argument does nothing.

b)

Commands entered separately - each on its own line - work the same way as commands separated by semi-colons, ';' characters.

c)

The a option is passed to the ls command to tell ls to output information about all files in the current directory including files that are hidden by default. The loption is passed to the ls command to tell ls to output extra information (a "long" listing) about files in the current directory.

d)

The pwd command outputs ("prints") the current working directory.

e)

The commands, cd; pwd; ls -la, are executed from left to right. The pwd command does not run until the cd command has finished running. The ls -la command does not run until the pwd command has finished running.

f)

Executing "cd ~" without the quotes produces a different result than executing cd with no option/argument.

Explanation / Answer

Hi,

a) False- cd with no arguements is equivalent to cd ~ , this command takes us to home directory

b) True, ';' is treated as an end of command character and if we enter a:b:c; it treats them as 3 diff commands.
c) True. ls -a lists all files i.e hidden ones too. ls -l option says long listing format to display extra information.
d) True, pwd stands for present working directory, which is printed
e) True, ';' ensures that they are run sequentially one after the other.
f) False. As explained above cd ~ and cd are equivalent
Thumbs up if this was helpful otherwise let me know if you have any doubt in comments.