viernes, julio 20, 2007

Linux/Unix is idiot proof - Linux/Unix es a prueba de idiotas

VERSION EN ESPAÑOL: por favor bajar

----------------------------------------------------------------------

scsiformat is a utility for low level formatting partitions. As we all know, formatting means your data is gone and low level formatting means it is gone even further. But this utility is clever, let's see what happens when you try to format a partition:

# scsiformat /dev/sda1
About to format SCSI disk /dev/sda on host 2 chan 0 id 0 lu
Short INQUIRY answer :-(i
Partitions:
8: 0 sda 262 MiB
8: 1 sda1 261 MiB

Formatting 262 MiB can take very long. Estimate: 1 min

Warning! About to lowlevel format / partition /dev/sda!

This will erase all data on /dev/sda, on any partition, be
To ensure that you are really awake and as a confirmation,
the solution for this simple multiplication:

21 * 14 = 444

Wrong. You lost, but your data won.




As you can see, the utility asks for a simple question, a multiplication. If you do not answer correctly the partition is not formatted. You lose but your data wins.

But we all know as well that almost every single Linux/Unix program includes a way to force the execution, normally it is either -f or -F. Let's see what the manual says about:


-F arg
forced operation, do not ask prior to format. arg must be 'Ene Mene Meck, und Du bist weg!' with proper spaces and capitalisation. (this is a German child rhyme kissing someone goodbye...


Of course you can force the execution of the command!!! You only need the option -F with an extra argument, the German sentence 'Ene Mene Meck, und Du bist weg!'. You can format your partition but scsiformat will ensure that you knew what you were doing!

----------------------------------------------------------------------------------------------------------------------------------

ESPAÑOL:

scsiformat es una utilidad para formatear particiones SCSI a bajo nivel. Como todos sabemos, formatear implica perder los datos que alli estaban y formatear a bajo nivel implica que estan se perderan del todo. Pero esta utlidad es inteligente, miremos que pasa cuando queremos formatear una particion:

# scsiformat /dev/sda1
About to format SCSI disk /dev/sda on host 2 chan 0 id 0 lu
Short INQUIRY answer :-(i
Partitions:
8: 0 sda 262 MiB
8: 1 sda1 261 MiB

Formatting 262 MiB can take very long. Estimate: 1 min

Warning! About to lowlevel format / partition /dev/sda!

This will erase all data on /dev/sda, on any partition, be
To ensure that you are really awake and as a confirmation,
the solution for this simple multiplication:

21 * 14 = 444

Wrong. You lost, but your data won.




Como podemos ver, la utilidad pregunta por la respuesta de una multiplicacion, si no respondemos correctamente la particion no es formateada. El mensaje de error es gracioso: Usted perdio, sus datos ganaron.

Pero todos sabemos que practicamente toda utilidad de Linux/Unix include una forma de forzar su ejecucion, normalmente es con la opcion -f o -F. Miremos que dice el manual acerca de eso:


-F arg
forced operation, do not ask prior to format. arg must be 'Ene Mene Meck, und Du bist weg!' with proper spaces and capitalisation. (this is a German child rhyme kissing someone goodbye...


Por supuesto que puede forzar la ejecucion del comando, solo es cuestion de utilizar la opcion -F acompañada de un parametro extra bien sencillito, la frase en aleman 'Ene Mene Meck, und Du bist weg!'. Su particion sera formateada, pero scsiformat esta seguro de que usted sabia que estaba haciendo!

1 comentario:

Unknown dijo...

Hablando de idiotas, me encontré este videillo...

El Jaquer