Wednesday, June 25, 2008

Remotely Recursively list files on the network

Bash single line:
for i in `cat workstations.txt`; \
do echo "========="; \
echo; \
echo $i; \
smbclient -p 445 -k //$i/c$ -D 'Documents and Settings/All Users/start menu' -c 'recurse;ls';\
done > Output\ Report.txt


This gives me the flexibility to see what desktops have whatever file I wanted to look up.

No comments:

Post a Comment