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
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.
Account created 1 year ago.
213 posts, 1116 comments, and 337 RAMs.
2 days ago:
Commented in thread 5 best Tunescool videos of all time!
Post a New Comment
Do you like having a good time?
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.