点击这里给我发消息 点击这里给我发消息
首页 > 行业资讯 > linux>详细内容

linux系统访问Windows文件共享

添加时间:2010-6-22
    相关阅读: 技术开发 开发 技术 程序 SQL Windows linux

[root@localhost ~]# rpm -q samba-client

    samba-client-3.0.28-0.el5.8

    [root@localhost ~]# smbclient -L 192.168.0.7 -U Administrator

    Password:

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

            Sharename       Type      Comment
            ---------       ----      -------
            E{GetProperty(Content)}nbsp;             Disk      默认共享
            IPC{GetProperty(Content)}nbsp;           IPC       远程 IPC
            D{GetProperty(Content)}nbsp;             Disk      默认共享
            print{GetProperty(Content)}nbsp;         Disk      打印机驱动程序
            SharedDocs      Disk
            ZJDocument      Disk
            临时文件交流 Disk
            HPLaserJ        Printer   HP LaserJet 3200 Series PCL
            公共文档    Disk
            本地磁盘 (G) Disk
            vs2008          Disk
            F{GetProperty(Content)}nbsp;             Disk      默认共享
            ADMIN{GetProperty(Content)}nbsp;         Disk      远程管理
            C{GetProperty(Content)}nbsp;             Disk      默认共享
            soft            Disk

    session request to 192.168.0.7 failed (Called name not present)

    session request to 192 failed (Called name not present)

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

            Server               Comment
            ---------            -------
            Workgroup            Master
            ---------            -------

    [root@localhost ~]# ls

    anaconda-ks.cfg  install.log  install.log.syslog  mbox

    [root@localhost ~]# smbclient //192.168.0.7/soft -U Administrator

    Password:

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

    smb: \> ls
      .                                   D        0  Tue Jun 23 02:26:16 2009
      ..                                  D        0  Tue Jun 23 02:26:16 2009
      Adobe_Reader_9_1.exe                A 44910072  Wed May 27 13:43:46 2009
      cento2s5VM                          D        0  Wed Feb  4 09:14:29 2009
      CLSDS-3[1].1.doc                    A    80896  Tue Sep  4 20:55:56 2007
      Convert all SWFs to JPG.vbs         A     1045  Mon May  4 16:54:16 2009
      data                                D        0  Mon May 18 19:37:21 2009
      driver                              D        0  Fri Aug 29 00:27:16 2008
      ex070117.log                        A 1698385454  Thu Jan 18 08:00:02 2007
      ex070118.log                        A 1680195444  Fri Jan 19 08:00:02 2007
      ex070119.log                        A 1674275535  Sat Jan 20 08:00:02 2007
      MySQL5.1中文手册.chm            A  4648580  Tue Jul  1 16:17:02 2008
      PureCodec20090126.exe               A 68565499  Tue Apr 28 15:40:57 2009
      system                              D        0  Tue Jun  9 02:33:40 2009
      t41                                 D        0  Sun Apr  6 11:57:00 2008
      TrueImageES-v9.1                    D        0  Tue Jun 23 02:25:42 2009
      vb60_full                           D        0  Tue Apr 14 13:37:45 2009
      zojiaoxpsp2.ISO                     A 2437634048  Fri Aug  3 18:17:25 2007
      新建 文本文档.txt             A       94  Mon Dec 31 18:21:07 2007
      系统备份                        D        0  Mon May 18 19:40:18 2009
                    44994 blocks of size 4194304. 9890 blocks available

    smb: \> get MySQL5.1中文手册.chm /mnt/MySQL5.1.chm

    getting file \MySQL5.1中文手册.chm of size 4648580 as /mnt/MySQL5.1.chm (7681.3 kb/s) (average 7681.3 kb/s)

    smb: \> q

    [root@localhost ~]# cd /mnt

    [root@localhost mnt]# ls

    MySQL5.1.chm

    [root@localhost mnt]#

    [root@localhost /]# mount -t cifs -o username=baiyuan,password=baiyuan //192.168.0.7/soft /mnt

    [root@localhost /]# cd /mnt

    [root@localhost mnt]# ls

    Adobe_Reader_9_1.exe         cento2s5VM

     MySQL5.1中文手册.chm   常规应用

    CLSDS-3[1].1.doc             PureCodec20090126.exe  技术开发

    Convert all SWFs to JPG.vbs  system                 播客安装教linux.doc

    data                         t41                    新建 文本文档.txt

    driver                       TrueImageES-v9.1       系统备份

    ex070117.log                 vb60_full

    ex070118.log                 zojiaoxpsp2.ISO

    [root@localhost mnt]# ll

本文作者:未知
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册