View Full Version : FTP from Terminal question
Sep 12, 2006, 07:04 PM
I was trying something else when I took a brain break from my Java. Since sending files from a Java app that I am working on using FTP I thought I would send a file to one of my other computers using the Terminal. I have a Unix book and it covers FTP and everything works fine.
But I have other drives attached to my computer. I was wanting to send a file that was located on an external drive that I have. the book only talks about sending stuff that is located from your root drive, ie. /Users/larsg5.
How do I get away from the Root Drive and to the external drive where the files are?
Sep 12, 2006, 07:29 PM
if all you want is to transfer a file over, you'll have to find out where the drive is mounted. type 'mount' to see which directory the computer mounted the drive to. then just copy the file to that directory.
or are you writing a java program that does this?
Sep 12, 2006, 07:52 PM
Way down the road it will be a Java command calling this up since that is the type of program that I would like to try to write.
I typed in 'mount' like you said and this popped up
/dev/disk0s3 on /Volumes/SB Hotel (local, journaled)
/dev/disk0s5 on /Volumes/Backup stuff (local, journaled)
/dev/disk4 on /Volumes/Video Raid (local, journaled)
/dev/disk6s3 on /Volumes/VideoPod (local, nodev, nosuid, journaled)
automount -nsl  on /Network (automounted)
automount -fstab  on /automount/Servers (automounted)
automount -static  on /automount/static (automounted)
The file I want is located on the Video Raid. so how do I change from the video /Users/larsg5 to the video raid drive for FTP transfer?
I know I can move the file to the internal drive. But later when I have learned and built the app I would like to have a button be pressed and the computer to ask for the path to the folder where things will be kept.
Sep 12, 2006, 08:21 PM
lcd "/Volumes/Video Raid"
That changes your host directory.
Alternatively, you could just put the file with the entire path:
put "Volumes/Video Raid/<filename>"
Sep 12, 2006, 09:55 PM
That is what I needed to know, tahnks.