smbclient "rm" commands returns "0" when it can't find the file. Shouldn't return non-zero value? aalawi@wm:~/filesensor$ smbclient -A filesensor.cred -c "rm test_file" //rome.fos.auckland.ac.nz/filesensor$ Domain=[EC] OS=[Unix] Server=[Samba 3.2.11] NT_STATUS_NO_SUCH_FILE listing \test_file aalawi@wm:~/filesensor$ echo $? 0 aalawi@wm:~/filesensor