Accessing windows files from linux / unix

February 21st, 2010

I recently had the need to write files from a UNIX server to a Windows file server.  In this instance the file was created as the result of an Informatica process, but this technique could be used if the file was created by Pentaho Data Integration, Talend, or any other method.  In this case ftp was not an option, nor was a permanent mount.  To move the file, I used smbclient. 

The command is fairly simple:

/path_to_smbclient_on_unix_server/smbclient //windows_server_name/directory_on_windows_server -A /path_to_authentication_file_on_unix_server/.smbclient (authentication file) -c “prompt; lcd /path_to_source_file_on_unix_server/; cd \”path_to_put the file_on_windows_server\”; mput my_file_name.txt;”

The format of the autentication file is also simple:

username = <value>
password = <value>
domain   = <value>

The New Blog.

February 19th, 2010
Watch this space for loosely cohesive, brief posts concerning business intelligence, data warehousing, and data integration.