AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  cp command -a option

    Posted Tue April 23, 2024 03:02 PM

    Installing on AIX from MetaCpan I've run into a module that uses the cp command with the -a option.  Linux manpage says it is an archive option.  AIX does not appear to support the -a option.

    Is there a open version of cp in the toolbox that supports this option?

    Thanks for you assistance.



    ------------------------------
    Jim Rinn
    ------------------------------


  • 2.  RE: cp command -a option

    Posted Wed April 24, 2024 02:12 AM

    Yes, you can install coreutils rpm from AIX Toolbox , which provides open source version of cp. 



    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: cp command -a option

    Posted Wed April 24, 2024 03:43 AM

    After you installed coreutils and before you call CPAN or this module you should either:

    • temporarily change your PATH variable and include /opt/freeware/bin as your first directory into PATH
    • create an alias cp to /opt/freeware/bin/cp and unalias it later after you don't need it
    • patch the module to use /opt/freeware/bin/cp directly


    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 4.  RE: cp command -a option

    Posted Sat November 23, 2024 08:03 AM

    The cp command is a powerful tool for copying files and directories in Linux. It supports various options, including the -a (archive) option, commonly used to preserve file attributes, symbolic links, and timestamps during recursive copying. However, this option is not universally available on all Unix-like systems, such as AIX.

    To address the issue:

    For more advanced use cases and examples of the cp command in Linux, refer to the Vultr documentation linked above.



    ------------------------------
    Ritik Raj
    ------------------------------