Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001023 [1003.1(2013)/Issue7+TC1] Shell and Utilities Editorial Clarification Requested 2016-01-11 18:55 2024-06-11 08:58
Reporter Clausecker View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Robert Clausecker
Organization
User Reference
Section ls
Page Number 2888–2897
Line Number 95140–95557
Interp Status Approved
Final Accepted Text See Note: 0003494.
Summary 0001023: Behaviour of ls -R without -a under presence of directories beginning with a dot
Description IEEE 1003.1, 2013 Edition specifies the that "Filenames beginning with a <period> (’.’) and any associated information shall not be written out unless explicitly referenced, the −A or −a option is supplied, or an implementation-defined condition causes them to be written." Furthermore the -R option is specified as "Recursively list subdirectories encountered. When a symbolic link to a directory is encountered, the directory shall not be recursively listed unless the −L option is specified. The use of −R with −d or −f produces unspecified results."

Different POSIX certified systems seem to understand the meaning of "encountered" with respect to directory names differently. The first interpretation I found is that directories omitted from printing because their name begins with a dot are also omitted from recursive listing unless -a or -A is supplied. This behaviour can be found on Solaris and HP-UX. The second interpretation is that all subdirectories are always listed, including those with names beginning with a dot, regardless of whether they are listed or not. This behaviour can be found on AIX.
Desired Action Clarify the behaviour of ls -R with respect to directories whose name begins with a dot.

Preferably, to the paragraph beginning in line 95191:

    -R Recursively list subdirectories encountered. When a symbolic
       link to a directory is encountered, the directory shall not be
       recursively listed unless the −L option is specified. The use of
       −R with −d or −f produces unspecified results.

add the sentence

    When -R is used without -a or -A, it is unspecified whether
    subdirectories with filenames beginning with a <period> ('.')
    are recursively listed.
Tags issue8
Attached Files

- Relationships

-  Notes
(0003494)
Don Cragun (manager)
2016-11-17 16:55

Interpretation response
------------------------

The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this.
This is being referred to the sponsor.

Rationale:
-------------
It seems that all implementations of ls, but one, have excluded hidden directories when using ls -R without -A and without -a. The standard developers believe that this is the correct or intended behavior. However, the standard did not clearly specify this behavior.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Change:
    
    
Recursively list subdirectories encountered.


to:

    
Recursively list subdirectories encountered. Subdirectories with filenames beginning with a <period> ('.') shall be recursively listed if and only if the subdirectory name was included in the filenames listed for the containing directory.
(0003516)
ajosey (manager)
2016-12-15 18:08

Interpretation proposed: 15 Dec 2016
(0003546)
ajosey (manager)
2017-01-18 15:22

Interpretation Approved: 18 Jan 2017

- Issue History
Date Modified Username Field Change
2016-01-11 18:55 Clausecker New Issue
2016-01-11 18:55 Clausecker Name => Robert Clausecker
2016-01-11 18:55 Clausecker Section => ls
2016-01-11 18:55 Clausecker Page Number => 2888–2897
2016-01-11 18:55 Clausecker Line Number => 95140–95557
2016-11-17 16:55 Don Cragun Note Added: 0003494
2016-11-17 16:56 Don Cragun Interp Status => Pending
2016-11-17 16:56 Don Cragun Final Accepted Text => See Note: 0003494.
2016-11-17 16:56 Don Cragun Status New => Interpretation Required
2016-11-17 16:56 Don Cragun Resolution Open => Accepted As Marked
2016-11-17 16:56 Don Cragun Tag Attached: issue8
2016-12-15 18:08 ajosey Interp Status Pending => Proposed
2016-12-15 18:08 ajosey Note Added: 0003516
2017-01-18 15:22 ajosey Interp Status Proposed => Approved
2017-01-18 15:22 ajosey Note Added: 0003546
2020-04-14 15:03 geoffclare Status Interpretation Required => Applied
2024-06-11 08:58 agadmin Status Applied => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker