![]() |
The Perl script will look at all files that are under a specified folder (even if in a sub-folder). Just try it.
|
OK, thanks!
|
Quote:
Code:
$ find -E ~/Library -regex '.{255,}' -printWhen it does get working, can we input values higher than 255? (how high?) FWIW, max OSX path is 1024 (according to getconf PATH_MAX / ) |
Hmm, it seems to work on my machine. There should be no limit to how long a path it will report.
I don't have any paths under SyncServices that are longer than 255, but I created a file with the name of your 316 char path file under SyncServices/Local/clientdata and the script reports on that. (Its path length on my machine is 317 since my username is one char longer than yours) I modified the script (above URL) so that it uses only absolute search paths. Maybe try again with the new version - but it shouldn't make any difference since you supplied absolute paths when you ran it. If you want it to report the path length of the files that exceed the threshold, uncomment the line: print "$pathLen\n" If it still is not working for you with that 316 char file path, maybe comment out the 'if' statement so that it will always report the paths and lengths: #if ($pathLen > $pathLenThreshold) That should allow you to see what is happening with that 316 char file path. |
Hmm, same deal... but now i'm seeing that that 316-char file is actually a symbolic link. [what hath Apple wrought?]
So, i guess maybe when Perl tries to read it... it gets transported to the target instead. Here's a "listing"... Code:
ls -l [path-to-the-monster]Anyway... try making one, and see if that was it.... and i'll try a file on my end (after dinner). |
The problem was indeed because it was a symbolic link.
My script had a line in it like: return unless -f $_; # only interested in files, not directories but the "-f" test is only for plain files, not for symbolic links. I changed the script (at the above URL) to instead test for directories: return if -d $_; # only interested in files, not directories and it now works (even for long symbolic links :)) |
It works. Only trouble now is: yours runs 6 times faster than mine. :mad: ;)
Even if i uncomment your counter (so that it does display the char count), and run that up against a plain "find -E -regex" (with no pipe to wc) then... Code:
$ time find -xE ~/Library/Application\ Support -regex '.{255,}'I'm really starting to resent Perl's superiority. :D [hey, thanks] |
| All times are GMT -5. The time now is 10:17 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.