[Top][All Lists]

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

Re: find: print trailing slash for directories

From: Bernhard Voelker
Subject: Re: find: print trailing slash for directories
Date: Sun, 7 Aug 2022 12:49:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/6/22 09:20, Fourhundred Thecat wrote:> how difficult would it be to patch 
find, to print trailing slash for
> directories?
> This seems like a very useful feature, without interfering with
> compatibility or specifications.
> I am wondering if some simple patch would be possible to do this by
> default in find?

Besides Andreas' excellent solution to achieve this with existing functionality,
I'd like to emphasize that we can't simply change the default behavior:
a) find(1) is a tool with looong history and many scripts rely on its behavior,
b) compatibility with other implementations, and
c) the POSIX specification [1] has a quite clear and strict definition about how
the output shall look like.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Have a nice day,

reply via email to

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