+ Post New Thread
Results 1 to 7 of 7
*nix Thread, Simple question (you might think) in Technical; Ok to those in the know this is probably the simplest thing in the world but the answer is eluding ...
  1. #1
    MACIT's Avatar
    Join Date
    Sep 2008
    Posts
    51
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Simple question (you might think)

    Ok to those in the know this is probably the simplest thing in the world but the answer is eluding me.

    I have a linux box with a mounted windows share on called say "share1"

    i can get to in Gnome, it says its mounted and all is good

    Question: how do i get to it in terminal? Basically i want to copy some stuff from it using a scripted command line.

    Thanks in advance

  2. #2

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,101
    Thank Post
    1,430
    Thanked 1,693 Times in 1,266 Posts
    Blog Entries
    2
    Rep Power
    364
    which version of linux are you using?

  3. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,101
    Thank Post
    1,430
    Thanked 1,693 Times in 1,266 Posts
    Blog Entries
    2
    Rep Power
    364
    Open your favorite terminal....btw this works in gnome and kde.

    [user@localhost user]$ cd /mnt1/ <-as user cd yourself to the mnt1 folder and become root to create directory
    [user@localhost mnt1]$ su
    Password:
    [root@localhost mnt1]# mkdir copyfile <- this created a directory in the mnt1 folder

    [root@localhost mnt1]# ls /mnt1/ <-this command listed all my directories the mnt folder

    [root@localhost mnt1]# mount /dev/sda1 /mnt1/copyfile <-this is the command to mount copyfile folder so you can copy between mounts

    Log into windows, drop what you need into the copyfile folder.

    [root@localhost mnt1]# ls copyfile <-lists everything there.

    then i just copied it all to my home folder and i was done!

    This worked under Fedora 14.

    in terminal type as root: gedit /etc/fstab and NOW YOU CAN ADD THIS LINE TO FSTAB to auto mount it:

    Code: /dev/sda1 /mnt1/copyfile vfat noauto,users,rw,umask=0 0 0

  4. #4
    MACIT's Avatar
    Join Date
    Sep 2008
    Posts
    51
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Debian, Installed about 1 half years ago

  5. #5
    danbuntu's Avatar
    Join Date
    Dec 2009
    Location
    Maidstone, Kent
    Posts
    284
    Thank Post
    0
    Thanked 50 Times in 47 Posts
    Rep Power
    17
    look in /etc/fstab and find out where you mounted the share to.

    probably /media/share1

  6. #6

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    181
    Quote Originally Posted by danbuntu View Post
    look in /etc/fstab and find out where you mounted the share to.

    probably /media/share1
    In modern Gnome remote Windows shares are mounted with gvfs, which doesn't interact with the real filesystem so it won't show up in /media or in /etc/fstab. gvfs-fuse fixes that, and it's packaged in gvfs-bin.

    Older Gnome uses gnome-vgs, and if that's the case you're SOL.

    Try looking in ~/.gvfs first, it might have just done the Right Thing™.
    Last edited by powdarrmonkey; 23rd March 2011 at 03:17 PM.

  7. #7

    Join Date
    Jan 2009
    Location
    upstate New York
    Posts
    23
    Thank Post
    0
    Thanked 12 Times in 7 Posts
    Rep Power
    13
    Not sure how your windows shares appear.

    From a command line, does 'mount' show the file system you have mounted ?

    If so, and if 'share1' is the only mount named like that, from a script

    cd `mount | grep share1 | cut -d' ' -f3`

    should put your script in that directory, in preparation for whatever copy or other commands you want to run.

    Good luck.

SHARE:
+ Post New Thread

Similar Threads

  1. Simple Simple Digital Signage Please!
    By rocknrollstar in forum Windows
    Replies: 29
    Last Post: 22nd May 2011, 05:52 PM
  2. Shutdown Script - Simple Question
    By M0MST in forum Windows
    Replies: 7
    Last Post: 25th November 2010, 11:02 AM
  3. Simple Software Assurance Benefits question...
    By Blue_Cookeh in forum Licensing Questions
    Replies: 2
    Last Post: 22nd June 2010, 11:42 PM
  4. [Pics] Simple but effective
    By Little-Miss in forum Jokes/Interweb Things
    Replies: 8
    Last Post: 7th January 2009, 11:59 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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