mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
18 lines
353 B
Bash
18 lines
353 B
Bash
|
#!/bin/bash
|
||
|
#smbclient -N -L localhost
|
||
|
|
||
|
# in linux guest: smbclient -U nerdz -L hostIP
|
||
|
|
||
|
outfile=/tmp/sharing.txt
|
||
|
|
||
|
zfs get sharesmb |grep ' on ' > $outfile
|
||
|
|
||
|
# REF: https://superuser.com/questions/499075/view-shared-folders-from-terminal
|
||
|
#sharing -l >> $outfile
|
||
|
sharing -l |grep -A 1 smb |grep -v smb >> $outfile
|
||
|
|
||
|
#less $outfile
|
||
|
grep -v '^--' $outfile
|
||
|
|
||
|
|