Operating System - HP-UX
1821537 Members
2293 Online
109633 Solutions
New Discussion юеВ

Creating executable/binary files

 
Peter Remirez
Occasional Advisor

Creating executable/binary files

Hi,
Is there a way which I can specify the dd command or the prealloc command to specifically create a binary/executable(something like an a.out file) in HP11?

If there aren't, could someone then show me other utilities in HP11 which could perform such task?

thanks



6 REPLIES 6
Adam J Markiewicz
Trusted Contributor

Re: Creating executable/binary files

I cannot imagine what do you intend to do and I guess other people can have the same problem.

Good luck
Adam
I do everything perfectly, except from my mistakes
Massimo Bianchi
Honored Contributor

Re: Creating executable/binary files

To create an executable file...

options:

on every kind of file:
chmod ugo+x filename

if you are using a compiler:
compile it and change permission with above command.


if creating a shell script:
chmod ugo+x filename

With prealloc of dd you can only prealloc a bunch of zeros/ copy a file.

What do you want to do ? If you explain, it would be better...

Massimo

Peter Remirez
Occasional Advisor

Re: Creating executable/binary files

Massimo & Adam,
All I intended to do was to create a new file i.e. a binary or machine executable file, besides being generated from some source codes.

Purpose is test the compression ratio for these files using the available UNIX compression utilities.

I'm not wanting to change the mode of a file (as described by Massimo).

Hope this explains.

Thanks in advance.
Jean-Luc Oudart
Honored Contributor

Re: Creating executable/binary files

You alreday have plenty of binary files on HPUX system.

You may take a copy of them to test the compression utilities.

Rgds,
Jean-Luc
fiat lux
Massimo Bianchi
Honored Contributor

Re: Creating executable/binary files

If that is your desiderata, then copy some already executable files !

Known to be scarsable compressable:
/stand/vmunix

Various:
all files in /usr/bin

Massimo
John Meissner
Esteemed Contributor

Re: Creating executable/binary files

the options I know about to create a binary file are these:

-compile source code using c++, gcc, or another compiler.

-shc - shc is a utility that will convert a shell script into a binary executable. I've used this a lot to protect scripts i've written.

I have the shc tar.gz file but it's 1.6 Mb so I can't attach it. you can find SHC here:

http://www.datsi.fi.upm.es/~frosal/frosal.html
All paths lead to destiny