It is easy to create a nt:file using Curl
echo ‘hello text’ | curl -u admin:admin -T – http://localhost:4502/content/geometrixx/test.txt
Copy the file from eclipse or the workspace across to the JCR/AEM directly.
The other alternate way of doing this when you have a file in the file system and you want to copy the file across is by using the command below:
curl -i -X POST -H “Content-Type: multipart/form-data” -u admin:admin -F name=abc -F “email@example.com” http://localhost:4502/apps/demo
The above command will create the file filename.jsp within the folder /apps/demo and will copy the file contents of rd.jsp into that file.