File name collision? / Colisão de nome de arquivos?

–en
I was on that “doing-nothing-until-working-hours-end” part of the day thinking about how big a Linux distro could be, then I go curious about: “is it possible to have file name collisions?”. Let’s take my own workstation as an example:


~# smart stats
Installed Packages: 907
Total Packages: 9099

Dont’t you think it’s possible that among 9099 available packages I could find at least two packages that have at least one file with the same name each? I think there’s a very high probability in it.


~# rpm -qla | wc -l
181384

If I have 181384 files installed by 907 packages, imagine if I had at least 25% of the amount of available packages. Dam! Why did I miss the statistics classes at school? :)

Anyway, if any of you ever faced that odd proabability in the real world, please, drop a comment bellow.

–pt_BR
Eu estava naquele momento do dia que chamamos de “não-fazer-nada-até-acabar-o-expediente” pensando em como pode ser grande uma distribuição Linux, então fiquei curioso sobre: “será possível ter colisão de nome de arquivos?”. Vamos ver minha própria máquina como exemplo:


~# smart stats
Pacotes Instalados: 907
Total de Pacotes: 9099

Vocês não acham que seria possível que entre 9099 pacotes disponíveis eu poderia encontrar pelo menos dois pacotes que tenham pelo menos um arquivo com o mesmo nome cada? Eu acho que existe uma probabilidade muito grande.


~# rpm -qla | wc -l
181384

Se eu tenho 181384 arquivos instalados por 907 pacotes, imaginem se eu tiver pelo menos 25% desses instalados. Droga! Por que eu faltei as aulas de estatística na faculdade? :)

De qualquer forma, se algum de vocês alguma vez já se deparou com esse estranho problema no mundo real, por favor, deixe seu comentário abaixo.

1 comment so far ↓ | 258 views |

#1 AdamW on 02.09.06 at 18:52

Oh, yeah, it happens. An instance was reported on Cooker mailing list just the other week - cdtool and cdp packages both contain a (different) binary called cdplay.

Leave a Comment

Powered by WP Hashcash