MACIT Posted March 22, 2011 Posted March 22, 2011 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
featured_spectre Posted March 22, 2011 Posted March 22, 2011 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
danbuntu Posted March 22, 2011 Posted March 22, 2011 look in /etc/fstab and find out where you mounted the share to. probably /media/share1
powdarrmonkey Posted March 23, 2011 Posted March 23, 2011 (edited) 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™. Edited March 23, 2011 by powdarrmonkey
mister_z Posted March 30, 2011 Posted March 30, 2011 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now