add command - Minix

This is a discussion on add command - Minix ; i want to know how can i add a new command in minix? how can system distiguish it as a command not just file so when i write it exexute?...

+ Reply to Thread
Results 1 to 5 of 5

Thread: add command

  1. add command

    i want to know how can i add a new command in minix? how can system
    distiguish it as a command not just file so when i write it exexute?


  2. Re: add command

    myfreedom wrote:
    > i want to know how can i add a new command in minix? how can system
    > distiguish it as a command not just file so when i write it exexute?
    >

    Each file as execute permission bits on it. These bits determine if it
    is possible to execute the given file.

    Plus shell scripts have #! and program binaries have magic numbers in them.

    Don't you think they dealt with this in the original UNIX in 1971?

  3. Re: add command

    not sure if this is related, but u also use this syntax, to run a
    custom made c program for instance:

    [prompt]./mycommand[enter]


    Segin wrote:
    > myfreedom wrote:
    > > i want to know how can i add a new command in minix? how can system
    > > distiguish it as a command not just file so when i write it exexute?
    > >

    > Each file as execute permission bits on it. These bits determine if it
    > is possible to execute the given file.
    >
    > Plus shell scripts have #! and program binaries have magic numbers in them.
    >
    > Don't you think they dealt with this in the original UNIX in 1971?



  4. Re: add command

    ka2 wrote:
    > not sure if this is related, but u also use this syntax, to run a
    > custom made c program for instance:
    >
    > [prompt]./mycommand[enter]
    >
    >
    > Segin wrote:
    >
    >>myfreedom wrote:
    >>
    >>>i want to know how can i add a new command in minix? how can system
    >>>distiguish it as a command not just file so when i write it exexute?
    >>>

    >>
    >>Each file as execute permission bits on it. These bits determine if it
    >>is possible to execute the given file.
    >>
    >>Plus shell scripts have #! and program binaries have magic numbers in them.
    >>
    >>Don't you think they dealt with this in the original UNIX in 1971?

    >
    >

    Try adding the binary to /usr/bin or something like that...

    Also can you post your source code?

  5. Re: add command

    On Sat, 3 Dec 2005, myfreedom wrote:
    > i want to know how can i add a new command in minix? how can system
    > distiguish it as a command not just file so when i write it exexute?

    Maybe you want to look at

    man chmod

    also look at the part about mode bits under

    man ls

    the output of a compiler should be marks as an executable by default.

    or are you asking about the hash-bang mechanism for shell scripts --The
    #!/bin/sh
    you see on the first line of many shell scripts?

    3ch


+ Reply to Thread