== A classical Unix tape gotcha Here's a classical Unix tape gotcha: > _mt -f /dev/st0 fsf 5_ If you're lucky when you make this mistake, you were _fsf_'ing the tape to read from it, and it is merely embarrassing and time-wasting. The difference between normal and no-rewind tape devices is that one rewinds the tape when you use it and the other doesn't. More precisely, the tape is rewound when the tape device is closed for the last time (usually *as* the device is closed; the _close()_ system call won't return until the tape has completed rewinding, which can lead to surprising lurching pauses in programs). The gotcha is that many people expect the tape device only to be opened when you're reading or writing actual data to the tape. But on Unix, just getting the tape's status or sending it commands like _fsf_ also means opening and closing the tape device, and thus having the rewind go off. Life would be a lot simpler if the auto-rewind tape devices just didn't exist, or failing that at least were not the default devices and took an extra letter to use ('_/dev/rst0_' or something). But by now we are stuck with the situation in the name of tradition. (So the safe thing to do is never actually use the auto-rewind names, even if you want to rewind the tape and they're a letter shorter. Suck it up, use the _~~n~~st0_ versions, and rewind the tape with an explicit command.)