[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 |
URL:
<https://savannah.gnu.org/bugs/?56855>
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
_______________________________________________________
Details:
This is just https://savannah.gnu.org/bugs/?50259#comment13, but I thought it
deserved its own report.
https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=855dbdadbf75ca1f08f3e1c7c6811670e952d906
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:
<https://savannah.gnu.org/bugs/?56855>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #56855] find -printf %h gives an empty string for the root directory '/',
Tavian Barnes <=