Giter Club home page Giter Club logo

Comments (10)

kapitainsky avatar kapitainsky commented on July 21, 2024

The simple attempt to try to list only txt files compression status:

afsctool -t txt .

leads to program entering never ending loop and printing forever below info:

File content type: public.plain-text
File extension(s): txt
Number of HFS+/APFS compressed files: 1

Number of HFS+/APFS compressed files: 4
/disk/txt: No such file or directory
/disk/.:

It looks like arguments parser get it wrong.

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

Thank you for quick reply but not sure I understand.

I have just tried:

afsctool -c -t txt .

my understanding is that this should compress all txt files in current folder.

It does not - it enters never ending loop dispalying again and again:

/disk/-t: No such file or directory
/disk/txt: No such file or directory

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

To be precise I think it works (txt file was compressed) but looks that -t is parsed correctly but then as you allow to specify multiple folders your code parses -t and txt as they belong to list of folders

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

The same when I try to invert selection:

afsctool -c -i -t txt .

result - looping with message:

Totals of file content types
Number of HFS+/APFS compressed files: 0

Number of HFS+/APFS compressed files: 1
/disk/-i: No such file or directory
/disk/-t: No such file or directory
/disk/txt: No such file or directory
/disk/.:

Bottom line is that -i and -t options parsing is broken

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

This is why I put in plenty of conditional code to be able to test everything but the (de)compression on Linux... I can reproduce your issue, and will try to fix it soonish.

This is great news! Thank you.

-t takes a single argument only; it has to be specified multiple times if you want to declare multiple file types/extensions.

This is fine. As long as documented. But this is detail.

In the meantime, please use an external solution (find?). Or trust that the kind of files you want to exclude will be rejected quickly because a chunk that "compresses" to a larger size is encountered very quickly (so don't use the -L option nor LZVN compression).

yes I could do this with 'find' but then I lose parallel processing - so it becomes real slow. In my case I want to process many TB dataset which can contain hundreds thousands of files. I know that many of these files cant be compressed anyway so I want to speed up all process by excluding them. Obvious suspects like jpg, zip, gz etc.

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

and BTW afsctool is fantastic - extremely useful tool

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

kapitainsky avatar kapitainsky commented on July 21, 2024

yes I could do this with 'find' but then I lose parallel processing - so it becomes real slow.
No! If you activate parallel processing with -j or -J, the files specified on the commandline will be added to a queue (regardless of whether you specify the folders they are in, or individual files). That queue is than emptied by worker threads.

ok so it is some workaround - thank you for clarification

but clearly you suggest something else than:

find pattern -exec afsctool

??

from afsctool.

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.