Command file in unix.

Need to know how to create self commands in unix.

I want to do some jobs in my unix machine regularly. i want to make a command kind of stuff. Please let me know how to create a command file in unix.

I crated a file in bin directory and used my logic there it works fine like command when i call.

but i want to make that command file not readable format.

like if i view other commands like ls or other things i cannot read the content . i want to do like that.

I think we have to change the mime-type of the command file which i created. Is that right. If so can anybody tell me how to do that?

No, I don't think that has anything to do with it actually. Mostly since that doesn't make since to me.

I assume this means you created a type of shell script, but now you want to make a compiled binary file. You would need to learn C or C++ ( or some other language ) and write the program in that language.

okie you mean we have to write in c and then build the file. there is no way in shell is that what you mean?

Yes, that is what I mean.

Why do you want to create a binary file as opposed to the shell script version?

-S

My goal is i dont want anybody to edit that file.

maybe you can just set your permissions....that should prevent anyone (besides root) from even reading your file.

-S

I already did that. But my goal is not editable file.Anyway thanks.

all you need to do is make it executable. no one will be able to view or write to it...except root.

chmod 111 filename or
chmod 100 filename

good luck with it.

-S

Nor will anyone be able to run it. You need read permission even as the owner to execute a script.

woops my mistake! i was in a rush!