File Walker

Kay C Lan lan.kc.macmail at gmail.com
Mon Sep 29 23:02:31 EDT 2014


If I enter the following into OS X's Terminal:

find $PWD

the output is the over half a million folders and files in my
/Users/[your name here]/ directory. So none of the System level stuff
or anything from other User accounts if they exist on your computer.
It does include though all hidden files and folders.

But if I do this in the message box:

put the millisec into tStart
put shell("find $PWD") into tStore
put the millisec into tEnd
put the number of lines of tStore & cr into msg
put tEnd - tStart after msg

The output is 17795 lines (which is the equivalent of files and
folders) in 231 ms. Why is LC truncating the output by over half a
million lines?

If I compare the outputs it doesn't appear to be memory related,
unless it happens to be a 1 in a billion coincidence. The first folder
whose full contents, including subfolders, is listed is
~/Applications/Developer/ - this is at the User level not the System
Level Applications folder. The output from Terminal and LC are
identical. The next folder to be listed from Terminal is
~/Applications/Games/ but there is not a single entry from the folder,
or any other folder listed by LC. It's as if LC has chosen just one
folder and then listed it's full contents, but I know this is
illogical, the LC shell command is outside of LC's control, all it
should be doing is taking the result.




More information about the use-livecode mailing list