When an empty file is created, how is it possible that its size can be listed as zero bytes? Even an empty file named “a.txt” needs some amount of data to store:
- The letters in its file name;
- It’s creation time; and
- Various other pieces of metadata.
Despite this, it is possible for a zero-sized files to exist. Creating two text files, one with text and one without, and then running
ls -lha yields the following reply on Ubuntu:
-rw-rw-r-- 1 256-kilobytes 256-kilobytes 0 Apr 15 12:18 empty-file.md
-rw-rw-r-- 1 256-kilobytes 256-kilobytes 1.5K Apr 17 17:02 file-with-text.md
Which verifies that the empty file is, in fact, considered to be a zero byte file. This indicates that the previously mentioned metadata is not in fact stored in these files. Rather, the metadata is stored as an entry in the operating system’s file system.
Can you fill your hard drive entirely with empty files?
Sure. Run this command from the terminal, but make it an infinite loop:
for i in `seq 1 10`; do nice_dogs=`shuf -n 5 /usr/share/dict/words | tr '\n' '-'` && touch $nice_dogs$RANDOM; done
- 7 Internet Marketing/SEO Tricks from the Slack Chat
- [Video] 28+ Methods to Make Money Online: The Ultimate Tier List from S-Tier through F-Tier
- How to block certain websites on your computer
- How a File Can be Zero Bytes
- 5 Tasks You Didn't Know Could be Done from the Developer Console
- Arch Linux vs. Ubuntu vs. Gentoo
- The Complete Guide to Discord Text Formatting, Syntax Highlighting, and Tricks for Adding Colors
- Twitch Installs Arch Linux | The Scariest Text-Based Adventure Game Ever
- Is Linux harder to use than Windows or MacOS? Or are you just a dirty casual?
- Bodhi Linux: What is it?
August Garcia is some guy who used to sell Viagra on the Internet. He made this website to LARP as a sysadmin while posting about garbage like user-agent spoofing, spintax, the only good keyboard, virtual assitants from Pakistan, links with the rel="nofollow" attribute, proxies, sin, the developer console, literally every link building method, and other junk.
Post a New Comment
Do you like having a good time?
Register an Account
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
Vandalize the Wiki
Or don't. I'm not your dad.
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.