To view all Linux shares:
shares=$(ls -l /var/lib/samba/usershares | awk '{print "/var/lib/samba/usershares/"$8}')
for i in $shares
do
cat $i | grep path
done
To remove all Linux shares:
#!/bin/sh
shares=$(ls -l /var/lib/samba/usershares | awk '{print $8}')
for i in $shares
do
net usershare delete $i
done
This entry was posted on Wednesday, February 4th, 2015 at 4:48 pm and is filed under General, Linux. You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.