smbclient
smbclient is a client hypervisor smb server, you can access the interactive samba server.
Scope of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora, SUSE, openSUSE.
1 , grammar
smbclient servername [ Options]
2 , the list of options
Options |
Explanation |
-? | --help |
Displays help documentation |
-V | --version |
Displays command version information |
-R | --name-resolve |
NetBIOS names into IP addresses corresponding to the order |
-M | --message |
Sending messages protocol winpopup |
-p | --port |
Specify the connection port, the default TCP 139 |
-m | --max-protocol |
The largest version of the protocol |
-I | --ip-address |
Specify the ip address for the connection |
-E | --stderr |
The standard error information to the device |
-L | --list |
Resource list display server |
-b | --send-buffer |
Set the buffer size of the transmission |
-e | --encyrpt |
Server requires encryption using |
-d | --debuglevel |
Set debug mode level, the higher the level of detail displayed in the log on month |
-l | ---log-basename |
The log file storage directory |
-N | --no-pass |
Without a password |
-A |
Reads the user name and password from the specified file, the file format is as follows: username=<value> password=<value> domain=<value> |
-U | --user=username[%password] |
Specify a username and password |
-n |
Specifies the NetBIOS name |
-W | --workgroup |
Specifies the user's domain smb |
-T | --tar |
The packaging server to share files to tar format |
-s |
Smb.conf specified directory |
3 , command
After logging samba server Supported commands
command |
Explanation |
-? [cmd] |
Documentation show command, if you do not specify a command, the command lists all documents |
![shell] |
Run shell |
allinfo file |
It asks the server to return all files or directories |
altname file |
Ask the server returns the file or directory aliases |
archive<num> |
Set archive level |
blocksize<size> |
Packaged set the block size, the default 20. Block unit 521B is |
case_sensitive |
Set file case sensitive |
cd |
Change directory |
chmod |
Modify permissions |
chown |
Modify uid and gid |
close <fd> |
Close the file opened using the open |
del <mask> |
Files conforming to mask the current directory |
of |
List directory information and disk information |
echo<number> <data> |
Effect of this instruction is to send a test message to the server ping |
exit |
drop out |
get |
Get File |
hardlink<src> <dst> |
创建硬连接 |
iosize <bytes> |
设置传输文件时使用内存缓冲区的大小,默认64512字节,可以设置的范围16384~16776960 |
lowercase |
将受到的文件中字母都改成小写 |
ls |
查看目录信息 |
md |
创建目录 |
mget <mask> |
获取所有匹配mask的文件 |
mkdir |
创建目录 |
mput <mask> |
发送当前目录下所有匹配msak的文件到服务器 |
put <local file> [remote file] |
发送文件 |
queue |
显示打印队列 |
quit |
退出 |
rd |
删除目录 |
rmdir |
删除目录 |
recurse |
改变递归选项的开关 |
rename |
重命名 |
rm <mask> |
删除当前目录下所有匹配mask的文件 |
showconnect |
显示当前连接 |
stat file |
显示文件信息 |
tar |
压缩文件 |
4、实例
1)连接服务器
|
2)查看命令
|
3)上传文件
|
做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
链接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密码:n7bk