English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a word for "truncate to size zero", preferably one which could be used and understood in the following way:

"...ing the file" := "truncating the file to zero bytes"?

RECAP: The best answers so far seem to be "empty the file", "zero the file size" and "truncate to (size|length) zero". In a suitable context, "truncate" has "truncate to (size|length) zero" as the default meaning (esp. since it's the commonest specific length to which files are truncated) but it's by no means the only one

share|improve this question
3  
"To truncate" means to cut down, usually assuming, I think, that something is left. Wouldn't "truncating a file to zero bytes" be the same as "deleting the file"? – Silenus Jan 17 at 1:06
1  
It isn't. "...ing to size 0" affects only file size (perhaps truncate isn't the right word, ow. I could use it in this meaning already), delete affects its existence – jaam Jan 17 at 1:11
1  
@Ricky There are plenty of situations where someone would truncate a file that have nothing to do with temporary files, and where no code was written. A quick google search will show that truncate is frequently used for this purpose. – jimm101 Jan 17 at 1:43
1  
@Silenus: There is history behind the use of the word "truncate" in this context (do Ctrl+F "truncate"). We can't very well rename O_TRUNC without breaking lots of code. – Kevin Jan 17 at 6:00
1  
man fopen uses "Truncate file to zero length" once explicitly and from then on just "truncate" for the same concept, the zero length thus being understood – Hagen von Eitzen Jan 17 at 10:34

Truncate is the correct word. Truncating a file means to eliminate all the content. The MySQL command for removing a table in database is TRUNCATE, which I present as a related term that clearly indicates the "zero size" aspect.

EDIT: Just to be clear, the "to size zero" is redundant. Truncate means what you want to say here.

share|improve this answer
6  
You are probably right that "truncate" is the best single word for it (but in general, "truncating a file" means truncating it to a specific length, which may or may not be zero) – jaam Jan 17 at 1:49
1  
@jaam - the size defaults to zero if not specified. – SomethingDark Jan 17 at 8:52
3  
@SomethingDark: that’s a default for certain programming languages, but not for English as spoken by most humans. For me, truncate in a programming context certainly can include the case of truncating to length 0, but my default expectation would be a non-zero length. Possibly there are some communities who would use it for 0 by default — I haven’t spent time around SQL professionals, for instance — but in the absence of other evidence, I somewhat doubt it. – PLL Jan 17 at 11:53
    
In my experience, truncate to a length triggers more confusion than truncate to zero. Let's remember there's also a specific context here in terms of file length, so general usage in English is secondary at best. Programmers form a community where English is spoken among non-native talkers, so words tend to pick up nuanced meanings that don't always apply outside that domain. – jimm101 Jan 17 at 20:47

empty the file, could be used. After all, one is left with an empty file.

There is Google evidence of usage for empty the file.

There is also Google evidence of usage for clear the file.

share|improve this answer

"Zeroing out" the file? Used to specify that a file has been deleted/shredded using an algorithm that sets all bits that were used to store the file to zeroes.

share|improve this answer
5  
The question is looking for a word for reducing the file's length to zero bytes long, not overwriting the file with bytes of value zero. Also, "zeroing out" the file would generally imply filling it with zero-valued bytes without changing its size or deleting it from the filesystem. – user2357112 Jan 17 at 2:16

I think that the word diminish could be used to mean reduce absolutely, to nothing.

to become or to cause (something) to become less in size, importance, etc.

Mirriam Webster

So you could say, diminishing the file.

share|improve this answer
2  
Diminish reduces the size of the file, not necessarily to zero bytes. – ab2 Jan 17 at 1:52

I think, Truncating can be replaced with " Reducing " as " Reducing to a size zero"

Example: The file should be truncated to size zero or Reduced to a zero size. Both can be used preferably.

share|improve this answer

Diminishing can also be used but the exact extent should be noted otherwise it will express indistinctly that what amount you want to diminish to.

Example: You should Diminish the cloth to a size zero.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.