When you use the redirect output symbol (>) on a command line, the shell creates the output file immediately, before the command is executed. Dem- onstrate that this is true.

$ ls aaa
ls: aaa: No such file or directory
$ ls xxxxx > aaa
ls: xxxxx: No such file or directory
$ ls aaa
aaa


The first command shows the file aaa does not exist in the working direc-
tory. The second command uses ls to attempt to list a nonexistent file

(xxxxx) and sends standard output to aaa. The ls command fails and sends
an error message to standard error (i.e., displays it on the screen). Even
though the ls command failed, the empty file named aaa exists. Because the
ls command failed, it did not create the file; the shell created it before calling
ls.

Computer Science & Information Technology

You might also like to view...

The address of a storage location in main memory is the __________

A) ?address space ? B) ?virtual address space C) ?real address ? D) ?virtual address

Computer Science & Information Technology

Paragraph shading cannot be used without a border

Indicate whether the statement is true or false

Computer Science & Information Technology

A ____ variable is not used for input or output, but instead is just a working variable that you use during a program's execution.

A. programming B. throw away C. temporary D. calculating

Computer Science & Information Technology

The “counter” variables that control a for loop’s repetitions are called loop control variables.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology