Song Li wrote:
On Fri, Jan 22, 2010 at 9:20 AM, Marc Espie <es...@nerim.net> wrote:
On Fri, Jan 22, 2010 at 07:43:31AM +0100, Song Li wrote:
What seems a little counter intuitive to me is: I would see sd0 as a
shortcut of /dev/sd0 for fdisk, but "fdisk /dev/sd0" does not work.
It's not, as miod pointed out.
Is it something you tried to "deduce" on your own ? or some misinformation
you found in a manpage/webpage somewhere ? if there is a typo in our
documentation that actually says "fdisk /dev/sd0", we would like to know
about it...
The man page for fdisk matches the actual OS. There is no typo.
On the other hand, IMHO, a system should allow its user's reasonable
assumption. It would be a headache for everyone if we have to memorize
the exact syntax for every single command.
No.
you told it "fdisk /dev/sd0"
"/dev/sd0" is a ABSOLUTE LOCATION, ABSOLUTE FILE.
and it doesn't exist. An error is the appropriate response.
You want a little flashlight to wave back and fourth and a paperclip to
pop up and say, "/dev/sd0 doesn't exist, could you possibly mean
/dev/rsd0c?" Wrong OS.
There are places where maybe we could make good guesses as to what the
user intended where we don't currently (better put as "shortcuts for
lazy typers"), but NEVER when an absolute path is specified, as you did.
Your knowledge of OSs is not as great as you think it is, you are still
typing commands blindly you don't understand. Those magic characters
have very precise meanings. Memorizing is not what it is about, it is
about understanding. I've been dating my GF now for six years, I still
can't remember her phone number reliably, and I have always had serious
problems with anything requiring rote memorizing...yet I fly through
OpenBSD very effectively...because I UNDERSTAND what I am typing. Unix
in general, and OpenBSD in specific encourages understanding of
commands, if you are trying to memorize your way through, you will be in
for a very frustrating ride.
Nick.