Question

In: Computer Science

Which command is used to hold open a very short or zero-length file?

Which command is used to hold open a very short or zero-length file?

Solutions

Expert Solution

A zero-byte file or zero-length file is a computer file containing no data; that is, it has a length or size of zero bytes.In some cases, zero-byte files may be used to convey information like file metadata ; or to put in a directory to ensure that it is nonempty, since some tools such as backup and revision control software may ignore the empty directories.

There are many ways that could manually create a zero-byte file, for example, saving empty content in a text editor, using utilities provided by operating systems, or programming to create it. On Unix-like systems, the shell command $ touch filename results in a zero-byte file filename. Zero-byte files may arise in cases where a program creates a file but aborts or is interrupted prematurely while writing to it. Because writes are cached in memory and only flushed to disk at a later time (page cache), a program that does not flush its writes to disk or terminate normally may result in a zero-byte file. When the zero-byte file is made, file system does not record the file's content on storage, but only updates its index table.

Sometimes zero-byte files may be created on purpose, just to provide some extra information to a folder listing, the same way you might create an empty folder to provide some extra meaning. For example, an empty file named __PRIVATE__ or FILES RELOCATED TO X


Related Solutions

Which command do you use to find the process that’s holding a file open? 1. w...
Which command do you use to find the process that’s holding a file open? 1. w 2. ps 3. top 4. fuser
More Object Concepts (Exercise 4) Part A: Open the file BloodData.java that includes fields that hold...
More Object Concepts (Exercise 4) Part A: Open the file BloodData.java that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –). Create a default constructor that sets the fields to “O” and “+”, and an overloaded constructor that requires values for both fields. Include get and set methods for each field. Open the file TestBloodData.java and click the Run button to demonstrate...
Question 1 What Unix command can be used to change the access permission of a file...
Question 1 What Unix command can be used to change the access permission of a file ?   and how ? Explain how pipe works in Unix. Give one example; Explain how redirect works in Unix and give an example. Explain the structure of Unix file system and how absolute and relative paths work What is UML ?   Briefly explain two types of diagrams in UML. Briefly explain two types of testing methods for software development and the major stages in...
For the following code I need to open the file of a persons choice which I...
For the following code I need to open the file of a persons choice which I did. I can get it to read the file, but I need help with counting lines and characters feel like i have the code I just cant make it work. Either way, the program should then ask the user Analyze another file (y/n)? and repeat the process again (asking for a file and analyzing its meta-data). This should continue repeating until the user chooses...
Which FTP command allows you to retrieve a file from within an FTP session? 39. Company...
Which FTP command allows you to retrieve a file from within an FTP session? 39. Company X requests an Internet address from the ICANN. Company X will require 129 nodes to be connected to the network across 14 locations (separate physical networks). What type of address will most likely be issued by the ICANN? How will this address be subnetted to allow for the 14 physical networks to exist? What is the total number of nodes that can be individually...
In the short run, when the firm produces zero units of output, which of the following...
In the short run, when the firm produces zero units of output, which of the following is always equals to zero? a. total cost b. total variable cost c. economic profit d. total fixed cost e. economic loss
How this command used for and provide examples for each one. Commands: 1-file 2-find 3-pwd 4-ln...
How this command used for and provide examples for each one. Commands: 1-file 2-find 3-pwd 4-ln 5-stat 6- cmp, comm, and diff 7-md5sum 8-du 9-gzip 10-gunzip 11-bzip2, and bunzip 12-cpio 13-tar 14-wc 15-vi editor
Very short pulses of high-intensity laser beams are used to repair detached portions of the retina...
Very short pulses of high-intensity laser beams are used to repair detached portions of the retina of the eye. The brief pulses of energy absorbed by the retina weld the detached portion back into place. In one such procedure, a laser beam has a wavelength of 810 nm and delivers 255 mW of power spread over a circular spot 163 μm in diameter. The vitreous humor (the transparent fluid that fills most of the eye) has an index of refraction...
Very short pulses of high-intensity laser beams are used to repair detached portions of the retina...
Very short pulses of high-intensity laser beams are used to repair detached portions of the retina of the eye. The brief pulses of energy absorbed by the retina welds the detached portion back into place. In one such procedure, a laser beam has a wavelength of 810 nmand delivers 250 mW of power spread over a circular spot 510 μm in diameter. The vitreous humor (the transparent fluid that fills most of the eye) has an index of refraction of...
Discuss the conditions under which investors would prefer to hold short-term bonds and when they would...
Discuss the conditions under which investors would prefer to hold short-term bonds and when they would prefer to hold long-term bonds. Find an Internet site that explains duration and how investors should utilize it in determining the appropriate bond investing strategy, given current interest rates and interest rate expectations. Provide a link for your classmates.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT