Using the following will display the actual timestamp: > stat -c %y FILENAME. smbclient is samba client with an "ftp like" interface. See man smbclient for details. I can create a new file, but if I need to overwrite it I need to delete the file, and then copy the new version over. smbclient //192.168.1.2/Users cd please read the smbclient man page for details. queue Displays the print queue, showing the job id, name, size and current status. In addition, it has a nifty ability to 'tar' (backup) and restore files from a server to a client and visa versa. Habanero. Using the "cp" command you can write a bash/shell script to copy. I couldn't get exactly what you mean, but if you only want to copy files from Unix system to a specific location in Windows just choose the destination folder from the left side of the application. With smbclient you don't need to mount the Windows share at all. OP. In the example below assume I have a local file named "Screenshot.png" at current dir and I want to copy it to a samba share named "Temp", on a samaba server named "server" in a domain "mydomain", which is fully funcional. If specified, name the remote copy remote file name.

Note that all transfers in smbclient are binary. The CentOS box is the only one having problems. If you need to copy files to or from a windows server from a unix server, you can use an utility from the Samba software suite called smbclient. It is more easy to demonstrate than to explain. With the ability to do most directory commands (ls, dir, cd, mkdir, etc. It can be used to transfer files, or to look at share names. put [remote file name] Copy the file called local file name from the machine running the client to the server. ), the file exchange capability of FTP, and many basic bash commands, smbclient quickly becomes a telnet on steroids. It is a useful tool to test connectivity to a Windows share. My Windows XP machine can overwrite files perfectly fine. Here is an example to copy a file to a Windows server: smbclient //WIN_SERVER/SHARE -l WIN_SERVER_IP -A AUTHFILE -c "put TRANSFER_FILE_LOCAL TRANSFER_FILE_REMOTE" where: Matt_P Feb 8, 2013 at 22:37 UTC. But, the thing is I need the shell script after my session completes to copy output file in to windows specified path. See also the lowercase command. For example, to retrieve C:\Directory\file.txt and copy it to /tmp on your Linux computer do this: smbclient '//windowsserver/c$' -c 'lcd /tmp; cd Directory; get file.txt' -U administrator%password -c Command to execute.