Coder Social home page Coder Social logo

Comments (4)

johnsonjh avatar johnsonjh commented on May 31, 2024 3

@cafkafk

This would be a neat extension because this has, in fact, been something available historically on other systems.

IBM AIX, since at least AIX version 3 (and optionally in AIX 2 and 1.3), has shipped li, which is an extended ls program, which has supported various features including treating archives as quasi-directories. It is unfortunately old and crusty now, so it doesn't properly visually disambiguate everything, and shows negative block counts, but I still use it all the time. It's part of the bos.compat.cmds package in current AIX.

In IBM AIX, an AIX/XCOFF .a archive will contain multiple versions of shared libraries and can also hold both 32-bit and 64-bit versions of them (sort of a FAT binary), for example:

$ li -lv -Rq /opt/freeware/lib/libgmp.a 
?rwxr-xr-x    1 sa       staff      725260  Nov 23 2021  <libgmp.so.10>
?rwxr-xr-x    1 sa       staff      785444  Nov 23 2021  <libgmp.so.10>
?rwxr-xr-x    1 sa       staff      478616  Nov 23 2021  <libgmp.so.3>
?rwxr-xr-x    1 sa       staff      555016  Nov 23 2021  <libgmp.so.3>
grand total -121 blocks

The ar interface is a bit clunkier, needing a flag to show 64-bit versions, and not doing name lookups, etc.:

$ ar -tv /opt/freeware/lib/libgmp.a
rwxr-xr-x   208/1     725260 Nov 23 18:17 2021 libgmp.so.10
rwxr-xr-x   208/1     478616 Nov 23 18:17 2021 libgmp.so.3

$ ar -X64 -tv /opt/freeware/lib/libgmp.a
rwxr-xr-x   208/1     785443 Nov 23 18:17 2021 libgmp.so.10
rwxr-xr-x   208/1     555016 Nov 23 18:17 2021 libgmp.so.3

If you tell li to recursively list directories, adding -Rq (recurse quasi) also recurses through the archives as well, just as if they were directories.

Since AIX has Rust now, supporting XCOFF archives would be great, but some kind of generic support (a, tar, cpio, zip) even without compression would be neat. Compression would be a bit tricky, you'd have to worry about some major slowdowns, "zip bombs", etc...

It sure would be nice for at least one replacement tool to catch up with what IBM had back in the 1980s.

from eza.

cafkafk avatar cafkafk commented on May 31, 2024 1

I'd be open to such a thing, could be super useful, but if a potential implementation is too heavy, we probably should consider feature gating this.

from eza.

cafkafk avatar cafkafk commented on May 31, 2024 1

(could also support bzip3, although this is probably considerably harder)

from eza.

taminob avatar taminob commented on May 31, 2024 1

I'd like to look into this issue since this sounds pretty useful.
I will probably only look into the support of one or maybe two archive formats for the first PR, but this can hopefully provide a foundation on which additional formats can then be added.

from eza.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.