带有ls -l选项的smbclient -c [英] smbclient -c with ls -l option

查看:61
本文介绍了带有ls -l选项的smbclient -c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从远程服务器获取文件夹列表,并且无法将远程服务器安装到我的本地计算机中(由于权限问题).

i am trying to get folder lists from remote server, and it is not possible to mount remote server into my local computer (because of the permission issue).

我用过

smbclient "//165.186.89.21/DeptDQ_141Q_FOTA" "--user=myid" -c 'ls;'

获取文件夹列表.结果就是成功.

to get lists of the folder. and the result was success.

但是,实际上我想在上面的命令行中使用 ls -l <​​/code>而当我尝试使用该行获取结果时

but, actually i want to use ls -l with the above the command line and when i try to get results using the line

smbclient "//165.186.89.21/DeptDQ_141Q_FOTA" "--user=LGE\final.lee" -c 'ls -l;'

返回

NT_STATUS_NO_SUCH_FILE listing \-l

            64000 blocks of size 16777216. 6503 blocks available

...我应该如何将smbclient运算符与ls -l选项一起使用?请帮助我!

... how should i use smbclient operator with ls -l option? please help me!

推荐答案

smbclient ls 不运行本机的 ls 命令,而是调用内置功能.因此,它不支持本机,符合POSIX的 ls 命令将提供的常规选项.

smbclient ls does not run a native ls command, but rather invokes built-in functionality. As such, it does not support the usual options which a native, POSIX-compliant ls command would provide.

因此,您不能这样做.

如果您的目标是读取元数据,请考虑改用 smbclient stat [filename] 子命令(如果您的服务器支持UNIX扩展名)或 smbclient allinfo [filename] (否则).

If your goal is to read metadata, consider trying the smbclient stat [filename] subcommand instead (if your server supports UNIX extensions), or smbclient allinfo [filename] (otherwise).

这篇关于带有ls -l选项的smbclient -c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆