[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: |
Mon, 17 Jul 2017 23:00:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
>> https://savannah.gnu.org/bugs/index.php?51309
>
> Yes, that helps immensely for framing the problem you are trying to solve.
Would you like to look into any more scripts where I got a need
for special handling of file lists?
> 'echo "echo $(ls *txt)"' is inherently slower (and at more risk
> of bugs due to \n in file names, etc) than 'echo *.txt'.
It seems that I constructed a questionable example there.
>>> $ find a -maxdepth 1 \! -type d -printf %f\\n
>>
>> Can it be that this command retrieved more data than necessary just for the
>> display of the basename?
>
> strace it and find out, or read the source (this is open source, after all).
Which source file would be relevant in this case?
I might get also an inappropriate impression from the wording in the manual.
“…
%f File's name with any leading directories removed (only the
last element).
…”
The result of this functionality could fit to my imaginations.
> GNU find invocation outperforms a comparable $(cd dir && echo *txt),
> because it avoids userspace globbing overhead, although I did not try to
> benchmark that to confirm things.
I am curious to know a bit more about such a technical comparison.
Regards,
Markus
Re: Determination of file lists from selected folders without returning directory names, Kaz Kylheku (Coreutils), 2017/07/17
- Re: Determination of file lists from selected folders without returning directory names, SF Markus Elfring, 2017/07/17
- Re: Determination of file lists from selected folders without returning directory names, Kaz Kylheku (Coreutils), 2017/07/17
- Re: Determination of file lists from selected folders without returning directory names, Eric Blake, 2017/07/17
- Re: Determination of file lists from selected folders without returning directory names, SF Markus Elfring, 2017/07/18
- Re: Determination of file lists from selected folders without returning directory names, Kaz Kylheku (Coreutils), 2017/07/18
- Re: Determination of file lists from selected folders without returning directory names, SF Markus Elfring, 2017/07/18
- Re: Determination of file lists from selected folders without returning directory names, Bernhard Voelker, 2017/07/18
- Re: Determination of file lists from selected folders without returning directory names, SF Markus Elfring, 2017/07/18
- Re: Determination of file lists from selected folders without returning directory names, Bernhard Voelker, 2017/07/18