encyclopegia.org

Zero-byte file

A zero-byte file or zero-length file is a computer file containing no data. As the size (a.k.a. length) of a file is often measured in bytes, such a file has length of zero bytes. Although there are many ways to create a zero-byte file, one common way to intentionally create one is via the touch command. The command line touch abc creates a zero-byte file named . The creation of any file involves creating it with zero length, but usually data is written to a new file almost immediately after creation such that users don't generally notice files in a zero-byte state. The presence of a zero-byte file may indicate a failure of a program. One common scenario involves caching data in memory and then flushing to storage at a later time. A program that does not flush to storage (i.e. due to abnormal termination) may erroneously leave a zero-byte file. Sometimes, the time between file creation and writing data to it is long enough that a user does notice that the file has zero size before a program writes any content. Even a zero-byte file requires storage space since every file has file system metadata. The file system may allocate a minimum size of space to every file. Such file system parameters may be discovered via an operating system utility such as stat . Often this size is 4096 bytes. Some file formats include metadata (separate from file system metadata).…

A zero-byte file or zero-length file is a computer file containing no data. As the size (a.k.a. length) of a file is often measured in bytes, such a file has length of zero bytes. Although there are many ways to create a zero-byte file, one common way to intentionally create one is via the touch command. The command line touch abc creates a zero-byte file named . The creation of any file involves creating it with zero length, but usually data is written to a new file almost immediately after creation such that users don't generally notice files in a zero-byte state. The presence of a zero-byte file may indicate a failure of a program. One common scenario involves caching data in memory and then flushing to storage at a later time. A program that does not flush to storage (i.e. due to abnormal termination) may erroneously leave a zero-byte file. Sometimes, the time between file creation and writing data to it is long enough that a user does notice that the file has zero size before a program writes any content. Even a zero-byte file requires storage space since every file has file system metadata. The file system may allocate a minimum size of space to every file. Such file system parameters may be discovered via an operating system utility such as stat . Often this size is 4096 bytes. Some file formats include metadata (separate from file system metadata). In this case, a file that contains no content may have non-zero size. For example, a word processor document with no text, an image with zero-by-zero dimensions, or an audio sample of zero duration may contain metadata which makes the size of the file non-zero. On the other hand, some file formats have no metadata. For example, an ASCII text file has no metadata such that a file with no content has zero size. But, some text file formats do include a byte order mark header that describes the encoding making a file with no content non-zero in size. IF EXIST C:\NOTHING.TXT EXIT IF NOT EXIST C:\NOTHING.TXT GOTO START START REM Create the zero-length file C:\>type null>nothing.txt EXIT

References

No reference rows published for this article.

Cite this article

MLA

"Zero-byte file." encyclopegia.org, 2026, https://encyclopegia.org/wiki/zero-byte-file. Accessed 24 November 2026.

Chicago

"Zero-byte file." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/zero-byte-file.

APA

encyclopegia.org. (2026). Zero-byte file. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/zero-byte-file

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

direct–quadrature–zero transformation

stub · references available

File Allocation Table

stub · references available

Zero 7

stub · references available

Zero Effect

stub · references available

Zero Halliburton

stub · references available

Zero Mostel

stub · references available

Zero page

stub · references available

zero of a function

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1366975343 · 0.5 · snapshot enwiki-001366975343

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.