bugfindutils - Bugs: bug #15167, find . -type d output is not in...

 
 

bug #15167: find . -type d output is not in order

Submitted by:  None
Submitted on:  Wed 07 Dec 2005 07:44:08 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Invalid
Privacy: PublicAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.27
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 08 Dec 2005 12:56:12 AM UTC, comment #1:

Actually in your example the contents of the directory are not sorted. Instead, ls is sorting them (ls is required to sort its arguments). The find program, on the other hand, is not required to do this. The find program just prints the filename in the order they are returned by the kernel.

Hence this is not a bug; find is doing what it is supposed to do.

James Youngman <jay>
Project Administrator
Wed 07 Dec 2005 07:44:08 PM UTC, original submission:

I have files located in directories that are sorted by date (YYYY-MM-DD) and when I do a find . -type d they are outputted randomly.

[dhammis@who Photos]$ ls
2005-09-11 2005-09-22 2005-10-03 2005-10-15 2005-10-30 2005-11-14
2005-09-12 2005-09-23 2005-10-05 2005-10-17 2005-10-31 2005-11-18
2005-09-13 2005-09-24 2005-10-06 2005-10-18 2005-11-01 2005-11-19
2005-09-14 2005-09-25 2005-10-07 2005-10-19 2005-11-02 2005-11-24
2005-09-15 2005-09-26 2005-10-08 2005-10-22 2005-11-03 2005-11-25
2005-09-16 2005-09-27 2005-10-09 2005-10-23 2005-11-06 2005-11-27
2005-09-17 2005-09-28 2005-10-10 2005-10-24 2005-11-07 2005-11-30
2005-09-18 2005-09-29 2005-10-11 2005-10-25 2005-11-08 2005-12-01
2005-09-19 2005-09-30 2005-10-12 2005-10-26 2005-11-11 index.html
2005-09-20 2005-10-01 2005-10-13 2005-10-27 2005-11-12 memstick.ind
2005-09-21 2005-10-02 2005-10-14 2005-10-28 2005-11-13 mstk_pro.ind
[dhammis@who Photos]$ find . -type d
.
./2005-11-30
./2005-11-30/thumbs
./2005-11-30/scaled
./2005-09-16
./2005-09-16/thumbs
./2005-09-16/scaled
./2005-09-17
./2005-09-17/thumbs
./2005-09-17/scaled
./2005-10-26
./2005-10-26/thumbs
./2005-10-26/scaled
./2005-11-18
./2005-11-18/thumbs
./2005-11-18/scaled
./2005-10-06
./2005-10-06/thumbs
./2005-10-06/scaled
./2005-10-12
./2005-10-12/thumbs
./2005-10-12/scaled
./2005-09-13
./2005-09-13/thumbs
./2005-09-13/scaled
./2005-10-13
./2005-10-13/thumbs
./2005-10-13/scaled
./2005-11-27
./2005-11-27/thumbs
./2005-11-27/scaled
./2005-11-07
./2005-11-07/thumbs
./2005-11-07/scaled
./2005-11-25
./2005-11-25/thumbs
./2005-11-25/scaled
./2005-11-03
./2005-11-03/thumbs
./2005-11-03/scaled
./2005-09-22
./2005-09-22/thumbs
./2005-09-22/scaled
./2005-10-28
./2005-10-28/thumbs
./2005-10-28/scaled
./2005-10-24
./2005-10-24/thumbs
./2005-10-24/scaled
./2005-11-24
./2005-11-24/thumbs
./2005-11-24/scaled
./2005-10-17
./2005-10-17/thumbs
./2005-10-17/scaled

I can workaround it by piping it to the sort command, but this shouldn't be needed.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 08 Dec 2005 12:56:28 AM UTCjayStatusNone=>Invalid
  Open/ClosedOpen=>Closed
Wed 07 Dec 2005 07:44:09 PM UTCNoneCarbon-Copy-=>Added dhammis --AT-- hotmail --DOT-- com

Back to the top


Powered by Savane 3.1-cleanup1