Question

Suppose that initially, there is no file in the current directory named "newfile". Will "newfile" appear...

Suppose that initially, there is no file in the current directory named "newfile". Will "newfile" appear in the output of
​ls -l >newfile​  
Explain why or why not?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Suppose that initially, there is no file in the current directory named "newfile". Will "newfile" appear in the output of
​ls -l >newfile​

So, if there is no file named "newfile" then it will create a file named "newfile" and write command "ls -l" output to it.

Note: 
In case of read it will give error
But In case of write it will create a file it does not have any file with that name
Add a comment
Know the answer?
Add Answer to:
Suppose that initially, there is no file in the current directory named "newfile". Will "newfile" appear...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Linux Q4 (15pt): Write a script that describe every file or directory of current directory. Example...

    Linux Q4 (15pt): Write a script that describe every file or directory of current directory. Example output (input in bold): Document is directory Example1 is file Desktop is directory … …

  • Write a shell script called GetMyStuff.sh that will provide the above information (the script must be...

    Write a shell script called GetMyStuff.sh that will provide the above information (the script must be a executable, and must work regardless of which directory it is in). Also, just saying cat MyStuff.txt is not sufficient. (1.0%) A pipeline is the combination of at least 2 commands, where the output of command1 is the input for command2. The syntax is command1 | command2 where | is the pipeline operator. Read the man pages about the ls and wc commands. Devise...

  • Please provide screenshots of the commands. 1. ls – list directory contents $ ls $ ls...

    Please provide screenshots of the commands. 1. ls – list directory contents $ ls $ ls -l ______________________________________________________________________ $ ls -alg ______________________________________________________________________ 2. $ which echo ______________________________________________________________________ 3. $ whereis echo ______________________________________________________________________ 4. $ file <output from procedure 5> ______________________________________________________________________ alias – short cut command to a longer command $l $ alias l=”ls -alg" $l ______________________________________________________________________ $ unalias l $l ____________________________________________________________________

  • Please write a C program shall simulate an output redirection. Your program shall execute “/bin/ls” in...

    Please write a C program shall simulate an output redirection. Your program shall execute “/bin/ls” in your current directory and redirect the output to a file named “redirect_file.txt” in your current working directory.

  • I need to develop a C program that can recursively navigate the current working directory and...

    I need to develop a C program that can recursively navigate the current working directory and output the information (similar to what "ls -l" does). I cant hard code path names or use system() calls.

  • Exercise 8.4.1: Operations on files. 0 About Current directory File descriptors Open file table Symbolic Descriptor...

    Exercise 8.4.1: Operations on files. 0 About Current directory File descriptors Open file table Symbolic Descriptor name index File length Disk block # Descriptor Current index position free 20 5 7 | free 8 | 16 9 free abc free 16100 free 18 free 192808 550 40 test free Disk xxx free free XXXXXXXX XXX 256 bytes • Each entry in the current directory contains the symbolic name of a file, together with the index into the array of file...

  • 20. Write the DOS command to erase a file named FILEBILL which is stored in the...

    20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....

  • Question 1) Copy file called sortfile from my home directory. The file contains three columns of...

    Question 1) Copy file called sortfile from my home directory. The file contains three columns of information : username, uid number and group name respectively, separated by a field separator. Will the following command sort the file on the group name field? sort -t! -k3 sortfile A) Yes B) No Question 2) Copy the file called sortfile from my home directory. The file contains three columns of information : username, uid number and group name respectively, separated by a field...

  • Write a C function named deleteFront Assume that file singlyLinkedList.h exists (in directory singly_linked_list) and contains...

    Write a C function named deleteFront Assume that file singlyLinkedList.h exists (in directory singly_linked_list) and contains all structures and function except deleteFront. // KEEP THE FOLLOWING include DIRECTIVE ... #include "singly_linked_list/singlyLinkedList.h" // YOUR DEFINITION OF FUNCTION deleteFront GOES HERE ...

  • Linuxzoo tutorial 2 We can have spaces in our file and directory names (like Windows). File...

    Linuxzoo tutorial 2 We can have spaces in our file and directory names (like Windows). File names and directory names are case sensitive (unlike Windows). Create directories with the following names in your home directories, use ls to check they are there. My Documents gordon Gordon

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT