How Do I Create a Named Fork and Store Data In It?
I don't know about named forks except the resource fork. I can create it like so in Terminal (Bash shell):

echo "data fork area" &gt; /tmp/test.txt
echo "resource fork area" &gt; /tmp/test.txt/..namedfork/rsrc
cat /tmp/test.txt
cat /tmp/test.txt/..namedfork/rsrc


I don't know about size limitations.

You can also copy a binary executable into the resource fork, and extract the bytes back out into a file, and execute that file:

cp /usr/bin/whoami &gt; /tmp/test.txt/..namedfork/rsrc
# get ready for some bells to sound in your terminal
cat /tmp/test.txt/..namedfork/rsrc &gt; /tmp/test.bin
chmod u+x /tmp/test.bin
/tmp/test.bin


Note that the whoami command is kind of weird when you do this because it's really the id command, and so when you restore it, it reverts to the id command and you can do man id to learn more about that.