Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"find" not recursive on Apple OSX Mac Partition. #456

Closed
p5pRT opened this issue Aug 30, 1999 · 2 comments
Closed

"find" not recursive on Apple OSX Mac Partition. #456

p5pRT opened this issue Aug 30, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 30, 1999

Migrated from rt.perl.org#1297 (status was 'resolved')

Searchable as RT1297$

@p5pRT
Copy link
Author

p5pRT commented Aug 30, 1999

From tim.schmitz@sabre.com

I was happy to see perl was included with Apple's new OSX server. I
installed a perl script that I have been running on a SUN box for a long
time. The perl script uses the "find" function, which lets you
recursively dig down and collect all files and folders from a certain
path down. (i.e. if the path is "/", you can get the name of EVERY file
and directory in the filesystem.) This function works fine if the path I
give it points to a UNIX partition, but if the path I give it is in a
Mac partition (our share point for mac users), it doesn't do any
recursion. I can only see the first level.

Thanks,

Tim Schmitz
tim.schmitz@​sabre.com

@p5pRT
Copy link
Author

p5pRT commented Sep 9, 1999

From [Unknown Contact. See original ticket]

I was happy to see perl was included with Apple's new OSX server.

Agreed. But, if anybody in Apple's Mac OS X group is watching, could you
please send the perl porters your hints file and/or any source patches you
used to get perl going? Help save the world, and all that.

I installed a perl script that I have been running on a SUN box for a long
time. The perl script uses the "find" function, which lets you
recursively dig down and collect all files and folders from a certain
path down. (i.e. if the path is "/", you can get the name of EVERY file
and directory in the filesystem.) This function works fine if the path I
give it points to a UNIX partition, but if the path I give it is in a
Mac partition (our share point for mac users), it doesn't do any
recursion. I can only see the first level.

Ah. UNIX (and perl) finds save time by working out that the number of
child directories of a directory is equal to its link-count minus two.
This is only true on UNIX filesystems, or on really good emulations of
them. Looks like Apple doesn't fake up the link count so as to allow such
an assumption on HFS volumes viewed from Mac OS X. You need to rebuild
perl, telling Configure -Ddont_use_nlink. Except you can't, unless Apple
has supplied perl source which compiles on Mac OS X.

See the file hints/machten.sh in the distribution for an example of setting
this configuration variable. Apple needs somithing like this in its hint
file too.

If you can't rebuild perl, see the man page for File​::Find, which tells you
how to arrange that link-count is ignored at run time.

Tim, if you have a support contract with Apple, please feed this back. Thanks.

--
Dominic Dunlop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant