Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a file with a list of smb:// URLs, like this one:


I need a command line (something using xargs probably) that would allow me to remove all those files and I'm struggling to come up with one.

share|improve this question

1 Answer 1

Linux or Windows or whatever?

Linux: smbclient … -c "rm $filename".

Alternate solution: use CIFS (i.e. simply mount the filesystem), and then access the share with the usual command-line tools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.