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.

What will be an ideal response?

$ 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 directory.
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 mes-
sage 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...

_________ is a popular tool for cracking Windows passwords

a. Sid2User b. Cheops c. Netcat d. OphCrack

Computer Science & Information Technology

How are unit testing, integration testing, and system testing related? How are they different?

What will be an ideal response?

Computer Science & Information Technology