LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2012, 10:10 PM   #16
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,144

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351

md5sum will throw a monkey wrench into the works there for any file with an embedded newline character or backslash (and maybe other characters too) in its name. The md5sum output line will have a backslash at the very beginning, making it sort as unequal to the sum for an identical file with no oddball characters in its name.
 
Old 04-15-2012, 10:49 PM   #17
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by rknichols View Post
No, find just returns names in the order in which it encounters them in the directory. Unless the file names were placed in the directory in their natural collating sequence, or you happen to be using some file system that keeps its directories sorted, the output will not be sorted.
That's the behaviour I remember but the test on my system did list them in sort's ordering sequence. It was find version 4.4.2 and a JFS file system.
 
Old 04-16-2012, 12:59 AM   #18
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,144

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
In a JFS2 file system the directory entries are stored in a B+ tree sorted by name.
 
1 members found this post helpful.
Old 04-16-2012, 01:09 AM   #19
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by rknichols View Post
In a JFS2 file system the directory entries are stored in a B+ tree sorted by name.
Thanks rknichols, that explains the result seen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
find duplicate files using bash script? b-RAM Linux - Newbie 4 06-08-2010 08:05 AM
Creating hard links unixbrother Linux - Software 7 09-19-2009 06:39 AM
[SOLVED] rsync --link-dest not creating hard links on external usb drive quasi3 Linux - General 4 08-26-2009 11:11 AM
A bash script to find duplicate image files fotoguy Programming 7 01-25-2007 07:47 PM
bash: identify duplicate MS Outlook .msg files? morrolan Programming 10 10-26-2006 11:46 AM


All times are GMT -5. The time now is 03:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration