FTP from Terminal question

Discussion in 'Mac Programming' started by larswik, Sep 12, 2006.

  1. larswik macrumors 68000

    Sep 8, 2006
    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?


  2. jhu macrumors 6502a


    Apr 4, 2004
    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?
  3. larswik thread starter macrumors 68000

    Sep 8, 2006
    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 [159] on /Network (automounted)
    automount -fstab [163] on /automount/Servers (automounted)
    automount -static [163] on /automount/static (automounted)
    larsg5s-power-mac-g5:~ larsg5$

    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.

  4. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    Use lcd:

    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>"
  5. larswik thread starter macrumors 68000

    Sep 8, 2006

Share This Page