Others > Miscellaneous

Access files on other parititions and networked drives on command line

(1/1)

healer:
I would like to know how we can do a "ls" or "cp" on other partitions of the same computer or of the networked drives.  I am not too sure how to.

Ricky:
I don't get it ?

hmm..

Actually in linux all drives or partitions are under some mount point.
eg. Root partition is mounted under "\"
Var under \var
And home is at \home
So if you cant to copy a file from \var to \home then simply.

--- Code: ---cp \var\filename.abc \home
--- End code ---

Same goes for network drive, network drive are usually mounted under some mountpoint or you can use directly remote pointpoint (if you have proper access)

healer:
I can see all local drives and networked drives from Places so they should have been mounted.  For your information I have set up samba to read Windows files too, no problem at all from Places - > Network or Computer either.

I looked into /mnt but nothing was found.  Could you please tell me where the mount information should be located so that I can check?

Ricky:
It goes like this..
first you have to create a mountpoint ie. a directory then attach filesystem to that directory ie. mount it. Then you can access as if you are accessing local file.

If it is windows share then do this:(Say you want to mount it under /mnt/Shared

--- Code: ---# mount -t cifs //windows-server/anydirectory -o username=<username here>,password=<Password here>  /mnt/Shared
--- End code ---

Hope that helps.

healer:
I have tried your command "sudo mount -t cifs //windowsOSname/anydirectory -o username=username,password=Password /mnt/Shared" However it came back with the manual page of "mount".

Anyway I can access the files in the shared directory of my networked Windows systems without any problem through Nautilus by going to Places - > Network.  However the "/mnt" directory is still empty.  If it hasn't been mounted how can Nautilus display the files.  Anyway the above "mount" command failed.

What about the Windows partitions in the same computer?  Nautilus can display the files too.

Navigation

[0] Message Index

Go to full version