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...

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

1. You can optionally initialize a List object when you declare it. 2. Each item stored in a List has a corresponding index. 3. You can use subscript notation to access items in a List, just as you can with an array. 4. An exception will occur if a List index is less than 0 or greater than the List’s Count property minus 1. 5.The only requirement for using a binary search is that the values in the array must be sorted in ascending or descending order.

Computer Science & Information Technology

Menu item hot keys are case sensitive.

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

Computer Science & Information Technology

Which of the following basic guidelines should you adhere to when designing a poster? Select all that apply.

A. Grab attention. B. Set it apart. C. Always design the communication from the top down. D. Give the type and images equal emphasis. E. Communicate key messages.

Computer Science & Information Technology

Which of the following is not one of the guiding principles of software project scheduling:

A. time allocation B. effort validation C. market assessment D. compartmentalization 

Computer Science & Information Technology