How Do I Make This Hard to Misuse?
How Do I Make This Hard to Misuse?
Posted Apr 7, 2008 17:17 UTC (Mon) by vmole (guest, #111)In reply to: How Do I Make This Hard to Misuse? by nix
Parent article: How Do I Make This Hard to Misuse?
It's consistent, kinda. The problem comes when describing: "cp foo bar" translates as "copy _foo_ to _bar_" okay, but the obvious translation of "ln foo bar" to "link _foo_ to _bar_" doesn't; the latter seems to say _bar_ is the original, at least to my taste. You have to process it as "create a link to _foo_ named _bar_". Or just memorize it. :-)
      Posted Apr 8, 2008 8:24 UTC (Tue)
                               by IkeTo (subscriber, #2122)
                              [Link] (3 responses)
       
     
    
      Posted Apr 8, 2008 12:13 UTC (Tue)
                               by jzbiciak (guest, #5246)
                              [Link] (2 responses)
       
     
    
      Posted Apr 9, 2008 3:06 UTC (Wed)
                               by roelofs (guest, #2599)
                              [Link] (1 responses)
       
 
...are equivalent.  Sadly, cp foo/bar doesn't quite work.
 
Greg
      
           
     
    
      Posted Apr 9, 2008 3:33 UTC (Wed)
                               by jzbiciak (guest, #5246)
                              [Link] 
       
     
    How Do I Make This Hard to Misuse? 
      
> but the obvious translation of "ln foo bar" to "link _foo_ to _bar_" doesn't
I see this problem as an inaccuracy of the translation "link _foo_ to _bar_".  This seems to
imply that both _foo_ and _bar_ are pre-existing, and somehow a "link" is created between them
as a result of running the command.  Obviously not what is done by "ln".  It is instead to
"build a link to _foo_ called _bar_".  The cp is to "make a copy of _foo_ called _bar_".
Pretty consistent to me.
How Do I Make This Hard to Misuse? 
      
Although, since the final argument can be a directory, perhaps the best connector for both is
"at":
Make a copy of foo _at_ bar
Make a link to foo _at_ bar
Or in the plural case:
Make copies of foo, bar, baz, quux _at_ dest
Make links to  foo, bar, baz, quux _at_ dest
      Also keep in mind that the target for ln is optional.  Thus:
How Do I Make This Hard to Misuse? 
         ln -s foo/bar .
   ln -s foo/bar
How Do I Make This Hard to Misuse? 
      
That aspect of 'cp' always drove me nuts, probably because I learned MS-DOS first.  I've found
myself tempted to write a wrapper around 'cp' to make that form work.
I won't, though, only because I know it'll wreak havoc when I go to use someone else's account
for whatever reason.  (e.g. to show them how to do something.)
 
           