[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determination of file lists from selected folders without returning

From: SF Markus Elfring
Subject: Re: Determination of file lists from selected folders without returning directory names
Date: Tue, 18 Jul 2017 21:53:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

>> Are there other programs (besides the tool “find”) which support
>> such a data processing style?
> Sorry you lost me.  What are we talking about?

It is generally possible to achieve something with a command like
the following.

   :> find Test_dir -name '*.txt' -printf %f\\n

> This discussion mentions constructs with globbing *.txt and passing
> their basenames as parameter to another script ...

Yes …

> while worrying about the performance of stripping off the directories part
> of each item.

There are corresponding software development concerns.

> When globbing in such shell, you easily hit the maximum command line
> length of the shell, …

This limitation can occasionally trigger further development challenges.

> Furthermore, many file systems do not scale very
> well with several hundred thousand of files inside a directory.

Scalability issues can also become interesting.

> And if the files are furtherly processed by an external script,

I imagine that there are a few software improvement opportunities
to consider.

> why should a simple `basename` or ${name##*/} hurt the performance?

Such data deletion causes also corresponding processing costs, doesn't it?
Would it be nicer to avoid them if the initial input data could be provided
as “basenames” already?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]