Results 1 to 7 of 7

Thread: smb share path from command line

  1. #1
    Join Date
    Jun 2007
    Location
    UK
    Beans
    38
    Distro
    Ubuntu 13.10 Saucy Salamander

    smb share path from command line

    I've setup a network share between two Jaunty machines. It works like a dream, though I do have a question.

    Can I address the share from a command line? I have a script to do backups across the network, but using the new Jaunty method, the path (in Nautilus) is of the form "smb://<machine name>/<share name>". This is fine in Nautilus, but doesn't seem to work from the command line. I get "No such file or directory" errors if I try!

    Is there some way to get around this?

  2. #2
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: smb share path from command line

    You can get ftp-like access with "smbclient". Have a look at "man smbclient". The command is like: smbclient //server/sharename

  3. #3
    Join Date
    Jun 2007
    Location
    UK
    Beans
    38
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: smb share path from command line

    Thanks for that. It would let me write a script, yes. My current method involves using rsync, which I don't think can be made to work that way. Perhaps I need to re-think how I keep my machines synchronized!

  4. #4
    Join Date
    Dec 2007
    Location
    The last place I look
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: smb share path from command line

    i think it shoudl work. just use smbclient to mount the share on the local filesystem, then write the rsynch command to target that directory. the technology used to facilitate the mount shoudl be hidden from any application that uses that mount point.
    Last edited by doas777; July 19th, 2009 at 01:35 AM.

  5. #5
    Join Date
    Jun 2007
    Location
    UK
    Beans
    38
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: smb share path from command line

    Now I'm catching on. I'll give that a go! Many thanks for the help.

  6. #6
    Join Date
    Jun 2007
    Location
    Oz
    Beans
    501
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: smb share path from command line

    You can use a cifs mount to mount a Samba share in a directory on the client, as if it was a partition attached to the client, and rsynch to that.

  7. #7
    Join Date
    Jun 2007
    Location
    UK
    Beans
    38
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: smb share path from command line

    I tried CIFS and it worked a treat. Thanks for the help!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •