Author Topic: unix flags?  (Read 2033 times)

Offline memrosh

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
unix flags?
« on: September 30, 2006, 01:35:49 am »

Quick question:

Does basic file commands ( cp etc.) support unix flags?


cp -i /open/walrus /secure/cfg/races/walrus

I get-

  cp: couldn't find  /secure/cfg/races/-i

Is a different syntax needed or is it just not supported in this way?

If flags are supported, where can I dig to see whats available?

Memrosh (the one who only knows unix/linux via Mudding)

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1024
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
unix flags?
« Reply #1 on: September 30, 2006, 06:52:34 am »

The answer, for about 99% of typical unix shell switches

and flags, is "no".

The interface to DS, aka nmsh, aka "nightmare shell" is nowhere

near as powerful and functional as normal unix shells, largely

because MudOS is just an application, and is not required to do as

much as a full operating system. As a virtual machine, its needs

are taken care of by the underlying OS, and the mud's comparatively

simpler file handling requirements are mediated that way.

Further, the complicated standard file permissions and attributes

system of the typical unix os is not useful within the mud, so

there's no need to replicate that kind of functionality.

In the mud, most of the options available to commands in unix

would be very very very rarely, if ever used. So you can pretty

much expect that a command which emulates a unix function

(such as cp) does so in a very vague and abstracted way.

You can usually find out what options a command *will* take

by reading its help info, for example:

help ls

Will tell you about what you can do with that command.

Note that in the alpha lib, "cp" and "mv" take the -f switch to

force overwrites.

Offline memrosh

  • Acquaintance
  • *
  • Posts: 20
    • View Profile
unix flags?
« Reply #2 on: September 30, 2006, 04:02:40 pm »

Thanks for the informative explaination.

To me, this is what this folder (and the whole forum) is about:

Gaining a better perspective on the code and system in which we create.