让他让 2018-08-29 02:17 采纳率: 0%
浏览 1264
已结题

IBM 的AIX系统怎么不使用库生成uuid?

想不安装外部库的情况下用系统工具生成uuid,找到的指令生成了,却格式不一样。

http://www.kuqin.com/aixcmds/aixcmds5/uuid_gen.htm

这个指令生成的格式似乎不对,不是应该 是8-4-4-4-12吗?
求指导,最好用系统工具生成。

  • 写回答

1条回答 默认 最新

  • weixin_42717518 2018-08-30 09:31
    关注

    请参考下面的方法:

    To generate a character-string representation of a UUID, enter the following:
    /etc/ncs/uuid_gen

    This produces the following output:

    34dc23469000.0d.00.00.7c.5f.00.00.00

    To generate a template for an interface definition in the C syntax, enter:
    /etc/ncs/uuid_gen -c

    This produces the following output:
    %c
    [
    uuid(34dc239ec000.0d.00.00.7c.5f.00.00.00),
    version(1)
    ]
    interface INTERFACENAME {

    }

    To generate a C source-code representation of a UUID, enter the following:
    /etc/ncs/uuid_gen -C

    This produces the following output:
    = { 0x34dc23af,
    0xf000,
    0x0000,
    0x0d,
    {0x00, 0x00, 0x7c, 0x5f, 0x00, 0x00, 0x00} };

    To generate a template for an interface definition in the Pascal syntax, enter the following:
    /etc/ncs/uuid_gen -p

    This produces the following output:
    %pascal
    [
    uuid (458487b55160.02.c0.64.02.03.00.00.00),
    version (1)
    ]
    interface INTERFACENAME;

    end;

    To generate a Pascal source-code representation of a UUID, enter the following:
    /etc/ncs/uuid_gen -P

    This produces the following output:
    := [
    time_high := 16#458487df,
    time_low := 16#9fb2,
    reserved := 16#000,
    family := chr(16#02),
    host := [chr(16#c0), chr(16#64), chr(16#02), chr(16#03),
    chr(16#00), chr(16#00), chr(16#00)]

    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏