1830898 Members
3019 Online
110017 Solutions
New Discussion

Re: Converting LIF file

 
SOLVED
Go to solution
Henry Chua
Super Advisor

Converting LIF file

Hi Guys,

How can I convert a LIF file to a text file or do the reversal?

Thank u

Henry
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: Converting LIF file

the only command I know is lifcp

It creates new ones when mirroring disks and such.

If you can find it, you might try running the strings command on it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Converting LIF file

lifcp is the command. For instance, assuming that your boot disk is /dev/rdsk/c0t6d0, you can list the files in the boot area with:

lifls -l /dev/rdsk/c0t6d0

Then to copy the AUTO to your screen:

lifcp /dev/rdsk/c0t6d0:AUTO -

or copy it to a file:

lifcp /dev/rdsk/c0t6d0:AUTO /tmp/myAUTOfile

man lifcp lifrm lifls lif


Bill Hassell, sysadmin
Henry Chua
Super Advisor

Re: Converting LIF file

Hi Guys,

Thanks for the info. What do u make of the following attached file? It seems to be a LIF file.. can i know how to view the content?

Best regards
Henry
Stephen Keane
Honored Contributor

Re: Converting LIF file

It is a LIF file,

volume HFSLIF data size 1052 directory size 1
filename type start size implement created
===============================================================
WS_FILE -5791 2 110 20200080 00/00/00 00:00:00


The contents of WS_FILE are attached, but I don't know what it is! It looks like some sort of diagnostics output.

Henry Chua
Super Advisor

Re: Converting LIF file

Hi Stephen,

Thanks for the help. Can you tell me how did u get the final WS_FILE, I been trying but keep getting nothing.

This file actually contains parameter supporting an equipment. We input the parameter one at a time, and the system will then compiled the data into a LIF file. What I would like to know is could I convert the data directly into a LIF that is readable by the system? what do you think i should do?

Many thanks
Henry
Stephen Keane
Honored Contributor
Solution

Re: Converting LIF file

I saved you attachment.
I ran

# lifls -l file

I have already posted the result of that

I then ran

# lifcp file:WS_FILE WS_FILE

I got the name WS_FILE from the lifls command. I then posted the WS_FILE back.
Henry Chua
Super Advisor

Re: Converting LIF file

Thanks Steven,

when i strings the WSFILE i got a string of data. Can I used these datas to recreate an identical LIF file?

Regards
Henry
Stephen Keane
Honored Contributor

Re: Converting LIF file

You would need to create a new lif

# lifinit -n "HFSLIF" -v270080 -d1 newlif

where:
-n is the volume id of the lif i.e. HFSLIF
-v is the size of the lif
-d is the number of directory entries

These are the same values as your current LIF.

Then you would need to copy your new WS_FILE into your new LIF

# lifcp -T-5791 -i 0x2020080 new_ws_file new_lif:WS_FILE

where:
-T is the type
-i is the implementation

Then check it's all OK

# lifls -l new_lif

The only difference between the old LIF and the new LIF (apart from the WS_FILE) is the directory start which is 3 on the new LIF and 2 on the old one. I don't know whether that it important for your application. If it is, let me know and I'm sure we can fix it.
Henry Chua
Super Advisor

Re: Converting LIF file

Hi Stephen,

Thanks for your help. One question for "lifcp -T-5791 -i 0x2020080 new_ws_file new_lif:WS_FILW", what does new_ws_file represent, i got a "lifcp: Can't open new_ws_file for reading" error when executing it..

Do you think I can convert a string of data into a form that the system can understand?

Best regards
Henry
Stephen Keane
Honored Contributor

Re: Converting LIF file

new_ws_file would be the name of a normal Unix file in to which you have saved your string of data.