1 查看
1.1 服务器下的共享文件夹列表
1
|
smbclient -U username%passsword -L 10.168.0.200
|
1.2 共享文件夹的操作
1
|
smbclient -U username%passsword
//10
.168.0.200
/share1
|
显示如下:
1
|
Domain=[CMDSCHOOL] OS=[Windows Server 2012 R2 Standard 9600] Server=[Windows Server 2012 R2 Standard 6.3]
|
支持的子命令
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
smb: \> help
? allinfo altname archive blocksize
cancel case_sensitive
cd
chmod
chown
close del
dir
du
echo
exit
get getfacl geteas hardlink
help
history
iosize lcd link
lock lowercase
ls
l mask
md mget
mkdir
more
mput
newer
open
posix posix_encrypt posix_open
posix_mkdir posix_rmdir posix_unlink print prompt
put
pwd
q queue quit
readlink rd recurse reget rename
reput
rm
rmdir
showacls setea
setmode stat
symlink
tar
tarmode
timeout translate unlock volume vuid
wdel logon listconnect showconnect ..
!
|
1.3 子命令的执行
1
|
smbclient
//10
.168.0.200
/share1
-c
"lcd /u/snd; cd trans; get readme.txt"
-A ~/.smbpw
|
本文转自 tanzhenchao 51CTO博客,原文链接:http://blog.51cto.com/cmdschool/1853930,如需转载请自行联系原作者