[Top][All Lists]

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

[bug #56855] find -printf %h gives an empty string for the root director

From: Tavian Barnes
Subject: [bug #56855] find -printf %h gives an empty string for the root directory '/'
Date: Tue, 3 Sep 2019 11:56:19 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0


                 Summary: find -printf %h gives an empty string for the root
directory '/'
                 Project: findutils
            Submitted by: tavianator
            Submitted on: Tue 03 Sep 2019 03:56:18 PM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.7.0
           Fixed Release: None



This is just https://savannah.gnu.org/bugs/?50259#comment13, but I thought it
deserved its own report.

even documents that %h should give the dirname of the path, but:

$ find / /tmp -maxdepth 0 -printf '[%h]\n'
$ dirname /
$ dirname /tmp

%h giving the empty string can be a problem if you are using -printf to output
paths for processing by some other command, for example.


Reply to this item at:


  Message sent via Savannah

reply via email to

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