Reputation: 63
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).
i used
smbclient "//165.186.89.21/DeptDQ_141Q_FOTA" "--user=myid" -c 'ls;'
to get lists of the folder. and the result was success.
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;'
it returns
NT_STATUS_NO_SUCH_FILE listing \-l
64000 blocks of size 16777216. 6503 blocks available
... how should i use smbclient operator with ls -l option? please help me!
Upvotes: 3
Views: 14044
Reputation: 295288
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.
Thus, you cannot do this.
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).
Upvotes: 6