Results 1 to 3 of 3

Thread: access samba files from commandline

  1. #1
    Join Date
    Sep 2008
    Beans
    53
    Distro
    Ubuntu 10.04 Lucid Lynx

    access samba files from commandline

    Hi,

    Is it possible to access smb files from bash?
    for example i would like to run:
    file smb://server/dir/file.ext

    I get the "No such file or directory" error.

    thx,

    WBL

  2. #2
    Join Date
    Jul 2007
    Location
    Brisbane, Australia
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access samba files from commandline

    There could be an easier way, but I'd firstly mount the samba share by:

    sudo mkdir /media/server_dir

    sudo mount //server/dir /media/server_dir/ -t cifs -o
    user=[sambashare_username],uid=[localmachine username]
    Then you can change to /media/server_dir and do whatever.

    unmount by:
    sudo umount /media/server_dir
    Is this what you were after?

  3. #3
    Join Date
    Sep 2008
    Beans
    53
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access samba files from commandline

    yes it is!
    Had to install smbfs (or the samba package)
    Code:
    sudo apt-get install smbfs
    After that, tyhe mount.cifs manpage is also available, indeed specifying the options you gave me, and more.
    Code:
    man mount.cifs

    thanks!
    WBL

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
  •