Moving .csv file from windows(client) to linux server

Hi All,
I have a .csv file in "D:\Datafiles\Test.csv". I need to move this file to server top "$XXLS_TOP/admin/import/US/" using shell scripting.
Server : XYZ
Login : test_user
Password : password
Can anyone help me on this.I am new to shell scripting..
thanks

Hi,
As already mentioned above, you have 2 major options:
1.samba (lots of docs on the net)
2. ftp (even more docs on the net)
If you decide to use ftp, then here's a starting point:
-install ftp server on your Win machine-
-you can use lftp , which has the ability to read a set of commands from a file
For instance:
[kido@kido ~]$ pwd
/home/kido
[kido@kido ~]$ ls
cacti_backup.tar.gz                    Desktop     ftp       j2re-1_4_1_02-solaris-sparc.sh  out   test
cacti_data_query_ucdnet_device_io.xml  diskio.tar  help.txt  net-snmp_devio.xml              perl
[kido@kido ~]$ cd ftp
[kido@kido ftp]$ ls
ftpscript
[kido@kido ftp]$ cat ftpscript
open localhost -u kido,123kido$
ls
get help.txt
bye
[kido@kido ftp]$ lftp -f ftpscript
drwxrwxrwx    2 501      501          4096 Feb 25  2009 Desktop
-rw-r--r--    1 501      501      13137873 Mar 30 19:54 cacti_backup.tar.gz
-rw-rw-r--    1 500      500         34216 Feb 03  2007 cacti_data_query_ucdnet_device_io.xml
-rw-r--r--    1 501      501          4950 Apr 07 08:46 diskio.tar
drwxrwxr-x    2 501      501          4096 Sep 08 15:53 ftp
-rw-rw-r--    1 501      501           144 Jul 30 19:27 help.txt
-rw-r--r--    1 501      501      23023830 May 27 14:17 j2re-1_4_1_02-solaris-sparc.sh
-rw-rw-r--    1 500      500          2568 Aug 18  2005 net-snmp_devio.xml
-rw-rw-r--    1 501      501          8093 Aug 05 15:21 out
drwxrwxr-x    2 501      501          4096 Jun 16 15:38 perl
drwxrwxr-x    2 501      501          4096 Sep 02 13:10 test
[kido@kido ftp]$ ls
ftpscript  help.txt
[kido@kido ftp]$ You can modify ftpscript and put any commands you need. Then you can run "lftp -f ftpscript" from cron (for instance). For more details: man lftp.
kido

Similar Messages

  • Copy CSV file from windows to linux

    Our oracle is installed on UNIX machine so we have to place CSV file there.
    We are on windows.We are using Putty client to access UNIX server.
    how to copy CSV file from windows to UNIX server?
    Thanks

    vis1985 wrote:
    Our oracle is installed on UNIX machine so we have to place CSV file there.
    We are on windows.We are using Putty client to access UNIX server.
    how to copy CSV file from windows to UNIX server?Using scp (secure copy).
    It is supported by Putty and ssh services are available by default on most (if not all) modern Unix servers.
    Don't have a Windows machine close by, but I recall the scp command is supported by the Putty executable called "+pscp.exe+".
    The syntax is very simple:
    scp <from_destination> <to_destination>
    example (pushing a file from Windows to Oracle Unix server)
      scp c:\datafiles\accounts.csv [email protected]:/u01/files/accounts.csv This will prompt for a password.
    You also can use ssh trusted certificates (RSA or DSA keys) to automate this. Using Putty you can generate a key pair that consists of a private key and public key.
    You copy and paste the public key into the destination server's +$HOME/.ssh/authorized_keys+ file. This results the server in trusting that client and allows the client to connect (using ssh, scp and sftp) without having to supply a password (as the private part of the key serves as authentication). (I would however not use the oracle account for this, but a special scp-copy usage Unix account that does not support shell usage)
    If you want to automate it the other way around - have the Unix server pull the file from the Windows client, then you need to install server software on that Windows machine to allow it to provide such a file copy service.
    Again I suggest using ssh - OpenSSH is available for a variety of platforms, and Windows should be included. If not, there should be ssh service for Windows from Microsoft or another vendor that can be used.
    Any other method than ssh will be either insecure or problematic. FTP is insecure as usernames and passwords are transmitted in clear text. Using Windows File Sharing requires Samba to be loaded and configured on the Unix server - and this is extra work installing and configuring and testing s/w that uses a low level security, that is also proprietary and could required setting on the Windows client also to make it work in a somewhat robust fashion.
    The standard today is ssh. It is robust and secure. And it makes a lot of sense to use it.. and pretty good motivation for not using it ifo something else.

  • HT4527 I recently moved my files from windows xp to a new windows 8.1 pc using PCMover Express. When I open up a file within itunes, the music doesn't start in itunes, it starts in xbox music player. How do I move my itunes file so it opens in itunes?

    I recently moved my files from a windows xp pc to a new widows 8.1 pc using PC Mover Express. When I open up a file within the itunes folder, it opens to the default player xbox 360 media player. How do i transfer my itunes folder so it opens up in my itunes account?

    Hi kozzie17,
    If your music is no longer opeing in iTunes by default on your Windows machine, you may find the following article helpful:
    iTunes for Windows: How to make iTunes the default application for music and audio files in Windows Vista and Windows 7
    http://support.apple.com/kb/HT3202
    Regards,
    - Brenden

  • How to upload file from a client machine to server machine

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

    hei evryone!
    can anyone pls help me on how i can upload file from a client machine to another machine (or server). using jsp.Then later on, i can also retrieve the names of these files to place it as values for option tag in an html form.I have a seperate screen for uploading the file and the screen for displaying all the files that were uploaded on the server...
    any sample code/ ideas would be much appreciated.Thx!!!!

  • Moving music files from windows media player to itunes

    when I first got my ipod, only half of my music files moved from windows media player into itunes. Is there anyway I can import the rest of the music from windows media player into Itunes? I have tried using the import function and add file or folder to library and they do not seem to work!

    iTunes will not accept Window Media player tracks that are protected. If you imported them off your own CDs, did you check the option to apply protection to them? If so, your only choice is to re-rip those CDs.
    Patrick

  • Uploading Multiple Files from web client to web server

    Am using a Digitally signed applet to pickup files from a specific directory and only to pickup those of a specific type. Applet is called by a HTML converted page and uses the JAVA 1.3.1 plug-in. Client side is ok, but the server side does not work - cannot see how to drop the files down onto the web server.
    code
    URL url = null ;
    FileInputStream filReader = null ;
    DataOutputStream dosOutfile = null ;
    HttpURLConnection httpUrlConn = null ;
    int bytes = 0 ;
    //read local file on client's hd with signed applet
    try
    filReader = new FileInputStream( new File( fromFile ) );
    catch ( java.io.FileNotFoundException eNotFound )
    DisplayStatus ( fromFile + " Not found");
    eNotFound.printStackTrace();
    // start setup to server-side copy of in file
    try
    url = new URL ( toFile ) ;
    catch ( java.net.MalformedURLException eMalFormedUrl )
    DisplayStatus ( url + " url mal formed");
    eMalFormedUrl.printStackTrace();
    // create a HttpUrl connection for POSTING
    try
    httpUrlConn = (HttpURLConnection) url.openConnection(); // do not remove this casting, as needed
    catch ( java.io.IOException eIoException )
    DisplayStatus ( url + " IO not possible");
    eIoException.printStackTrace();
    // set preferences
    httpUrlConn.setDoInput(true); // default value, but best make sure
    httpUrlConn.setDoOutput(true); // default value, but best make sure
    httpUrlConn.setUseCaches(false); // enable write straight through
    try
    httpUrlConn.setRequestMethod("POST") ;
    // httpUrlConn.setRequestMethod("PUT") ;
    } catch ( java.net.ProtocolException eProtEx )
    DisplayStatus ( "Protocol Exception on setting up POST") ;
    eProtEx.printStackTrace();
    httpUrlConn.setRequestProperty("Content-Type", "multipart/form-data");
    // permissions?
    try
    java.security.Permission permission = httpUrlConn.getPermission() ;
    if ( iDebug == true )
    DisplayStatus ("Permission = " + permission.toString() ) ;
    DisplayStatus ( "Actions = " + permission.getActions() ) ;
    DisplayStatus ( "Name = " + permission.getName() ) ;
    catch ( java.io.IOException eUrlIOConnException )
    DisplayStatus ( "httpUrl " + httpUrlConn + " IO not possible");
    DisplayStatus ( eUrlIOConnException.toString() ) ;
    eUrlIOConnException.printStackTrace();
    // connect
    try
    this.VerifyHttpResponseCode ( httpUrlConn.getResponseCode() ) ;
    DisplayStatus ("About to connect") ;
    httpUrlConn.connect() ;
    DisplayStatus ("Connected") ;
    if ( iDebug == true )
    DisplayStatus ("Connected Content Encoding = " + httpUrlConn.getContentEncoding() ) ;
    DisplayStatus ("Connected Content Length = " + httpUrlConn.getContentLength() ) ;
    DisplayStatus ("Connected Content Type = " + httpUrlConn.getContentType() ) ;
    DisplayStatus ("Connected default allow user interaction = " + httpUrlConn.getDefaultAllowUserInteraction() ) ;
    DisplayStatus ("Connected File Map = " + httpUrlConn.getFileNameMap() ) ;
    DisplayStatus ("Connected request method = " + httpUrlConn.getRequestMethod() ) ;
    DisplayStatus ("Connected response code = " + httpUrlConn.getResponseCode() ) ;
    DisplayStatus ("Connected response message = " + httpUrlConn.getResponseMessage() ) ;
    DisplayStatus ("Connected = " + httpUrlConn.getURL() ) ;
    } // end of debug print out status
    catch ( java.net.ConnectException eConnEx )
    this.DisplayStatus ( "Connection error - no server listening or incorrect port " ) ;
    this.DisplayStatus ( "Connection error - http = " + httpUrlConn) ;
    eConnEx.printStackTrace();
    catch ( java.io.IOException eUrlConnException )
    DisplayStatus ( "url " + url + " connection not possible");
    DisplayStatus ( eUrlConnException.toString() ) ;
    eUrlConnException.printStackTrace();
    // create file on server
    try
    dosOutfile = new DataOutputStream ( new BufferedOutputStream( httpUrlConn.getOutputStream () ) ) ;
    catch ( java.io.IOException eNewFileIO )
    DisplayStatus ("Unable to create file on server / buffer output stream " + toFile ) ;
    // copy files char by char for the moment, till testing complete
    try
    bytes = filReader.read();
    while(bytes != -1)
    dosOutfile.writeByte(bytes);
    bytes = filReader.read();
    // close both files
    dosOutfile.flush ();
    dosOutfile.close ();
    filReader.close();
    catch (java.io.IOException eCpyIo )
    DisplayStatus ("Error copying files") ;
    connection of the HttpURLConnection
    gives 'Fobbiden' response for 'PUT'
    and
    'method not allowed' for 'POST'
    trying to create the file on the server than causes IOException at the create DataStream line
    What am I doing wrong?
    Is this philosphy correct?
    Should the HttpURLConnection be to the target folder
    and then create the file in it?

    hello,
    first here is my interpretation of your prob.
    You have a client.From this client you are trying to upload files onto a server.
    Finding the files and reading them on the client side is not a prob. The prob is storing them on the server side.
    right?
    If the above stated prob is right, here is a solution.
    1. You have to first inform the server that you are sending the file. Unless you do so the server will not understand when you have started sending the file.
    So, initially, the applet which you have written need to communicate with a servlet on the server side.
    This can be done using reqs.. .get or post.In the req itself you can even send the name of the folder wherein you want to store the file you are going to transfer later on.
    Next, after receiving the folder name, the servlet can now understand that next file data is going to be received.
    The applet now sends the file which is received by the servlet and stored appropriately.
    You need to explicitly write a servlet to receive a data into the file and then store the file into appropriate folder.
    for any further probs email me at [email protected]

  • Help: question on send XML file from java client to java server

    Hi, I am now to Java, and now I am going to set up a simple network in the lab.
    I have created a random array of data and transferred to XML file on my client. Now, I would like to send it to the server. I am wondering how I can put the XML file into my client, and do I need any parser to let the server show what random date it has received?
    Anybody can give me any idea or some basic code? Thank you.
    Now, I am referring the KnockKnock example in Java online tutorial. But, not clear how to deal with the XML File.
    Fengyuan

    There are several ways you can achieve this: one could be that you transfer data over HTTP, using Servlets for instance. Have a Servlet listening on the Server with content type 'text/xml', POST the XML data to the server and have the Servlet to receive the data and re-compose the XML file. This can be achieved with different libraries:
    1) JAXB --> this is good because is the JDK standard, also for web services
    2) Castor (http://www.castor.org/)

  • Moving movie files from Windows to iMovie

    Hello, I have recently purchased a Macbook and have a number of home movies on VHS I want to edit and convert to DVD using iMovie. I do not have a analog to DV device to connect to my Macbook, but I do have one installed in my Win/XP machine. I would like to import the VHS tapes into the Windows machine, then transfer them to the Mac. I would like to do this without having to get a $200 or more Analog/DV device if I can help it.
    My question is, what video format do I want to use to create the files on the Windows machine so when I transfer them to the Macbook they will be readable by iMovie and have both the video and audio and, if anyone knows, what application is better for this, Studio 9 or Ulead Studio 9.
    Thanks in advance.
    Macbook Mac OS X (10.4.8)
    Macbook Mac OS X (10.4.8)

    Hi Robert - welcome to the forum, and to the Apple MacIntosh world!
    Just a suggestion - if you have a dv (tape) video-camera, then you can record from your VCR tapes, directly onto a camera-tape, and thence into iMovie, without further loss of quality. Should you not have such a camera, but are keen to do movie editing using iMovie, then that should be an essential Christmas present to yourself!

  • Help with moving iTunes files from windows.old to reinstalled Vista.

    I had to reinstall Vista and iTunes.  I have found what I believe are my iTunes music files (.lib)
    When trying to add these files to the newly installed iTunes, they will not add.  Please help me.  I do not want to sync my iPhone or my wife's iPhone and risk erasing all the songs we have on them.
    Thank you in advance for your help.
    Cary

    Try here:
    http://www.lightroomqueen.com/how-move-lightroom-to-new-computer/
    http://helpx.adobe.com/lightroom/kb/catalog-faq-lightroom.html#How do I move a catalog?
    http://lightroomers.com/migrating-you-lightroom-catalog-and-photos-to-a-new-computer/1155/
    And if you need more info, just Google your question(s).
    John

  • How to connect oracle running on RH from windows client

    I installed oracle on RHEL4,..everything running well till now...
    And suddenly i got a problem, i can't connect from windows to my linux server....
    i configured my listener to binding linux server ip host,....and service naming to same ip...
    while testing connection i got error message...target host not exist....
    Anyone know some similar problem and maybe can help providing solution ? thanks in advance...

    This is the configuration on my Linux Server :
    [oracle@cybertech admin]$ cat listener.ora
    # listener.ora Network Configuration File: /home/oracle/product/10.1.0/db_1/netw
    ork/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /home/oracle/product/10.1.0/db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cybertech)(PORT = 1521))
    [oracle@cybertech admin]$ netstat -an|grep 1521|grep tcp | grep -v grep
    tcp 0 0 127.0.0.1:1521 0.0.0.0:* LISTEN
    tcp 0 0 127.0.0.1:1521 127.0.0.1:32776 ESTABLISHED
    tcp 0 0 127.0.0.1:32776 127.0.0.1:1521 ESTABLISHED
    This one was my windows client's TNSNames configuration :
    # tnsnames.ora Network Configuration File: C:\oracle\BIToolsHome_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.200)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    This one was my windows client's listener configuration :
    # listener.ora Network Configuration File: C:\oracle\BIToolsHome_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    SSL_CLIENT_AUTHENTICATION = FALSE
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = awi)(PORT = 1521))
    I tried configuring my linux server host ip to 192.168.0.200 and ping it using tnsping, then i got an error message : "no listener".
    should i reconfigure /etc/hosts.conf file to add ip 192.168.0.200..? 'cause there's only one ip "127.0.0.1" in /etc/hosts.conf
    thanks for the assistance until now ivan

  • OS X 10.4.7 server: Samba leaking ram when copying large files from windows

    Hi.
    I'm having problems with:
    Copying files from windows clients to OS X Server 10.4.7 uses up the RAM needed for the files to be copied.
    If I copy a 3GB file, it uses 3GB of RAM
    If I copy a 5GB file, it uses its 4GB of RAM, plus VM.
    If I copy 11GB of files (that is several little files, plus some big by dropping a folder to the share), it consumes all the RAM the machine has, and because of VM paging, whatever other clients are reading from the disk (XRaid) start to have hiccups.
    The RAM of the machine NEVER gets flushed after the copying has finished. So Samba is unusable as it is. I have four Xserves with 4GB of RAM, with 4 XRaids connected each one to each Xserve with its Apple Fiber Channel card and cables.
    I already did the ack=0 thing, got the size of inet.tcp.sendspace and rcvspace to 8388608 and the buffer to 16777216.
    The transfers rates are up to 70MB/s with 2 channel 1gb trunking, and at very sustained rates..
    We are using these to edit video content (DV 25) in Sony Vegas with 2 or 3 clients for each server.
    Any suggestions?
    Thanks very much.
    XServe G5 cluster node (4) / XRaid 7TB (4)   Mac OS X (10.4.7)  

    Michael, I occasionally notice anomolous behaviour when files get dragged between volumes. Mostly the copying window shows an accurate and immediate indication of what's going on, but other times it just looks like nothing's happening, the display never changes, yet, it is in fact copying the files over. Now, if you're copying 2gb files from DVD to HD, it's gonna take some time, more than 5 minutes, so I'm wondering how long you've left it before forcing it to quit?

  • Utl_file gives error when coping file from windows to linux

    Red Hat Enterprise Linux Server release 5.7 (Tikanga)
    Oracle 11.1
    Hi there,
    I can't copy a file with utl_file.fcopy after copying file with samba from winodws to linux. Only after I open the file on linux and save it, can I copy it :
    1.) Copy file from windows (drag and drop)
    2.)
    SQL> exec utl_file.fcopy('XXMS_DATA_IMPORTS', 'Project_62.csv','XXMS_DATA_IMPORTS', 'xxms_pa_tasks_master.csv');
    BEGIN utl_file.fcopy('XXMS_DATA_IMPORTS', 'Project_62.csv','XXMS_DATA_IMPORTS', 'xxms_pa_tasks_master.csv'); END;
    ERROR at line 1:
    ORA-29284: file read error
    ORA-06512: at "SYS.UTL_FILE", line 270
    ORA-06512: at "SYS.UTL_FILE", line 1243
    ORA-06512: at line 1
    3.)su to root
    4.)open file and save it with vi, without changing anything
    5.)
    SQL> exec utl_file.fcopy('XXMS_DATA_IMPORTS', 'Project_62.csv','XXMS_DATA_IMPORTS', 'xxms_pa_tasks_master.csv');
    PL/SQL procedure successfully completed.
    How can I copy from windows to linux with samba, so this doesn't happen?
    Please help

    After the file is initially created in Linux:
    What are the owner and group for the directory in which the file resides?
    What are the directory permissions?
    What are the owner and group for the file?
    What are the file permissions?
    What is the OS name of the oracle user?
    After root vi's and resaves the file:
    What are the owner and group for the file?
    What are the file permissions?

  • Transfering files from windows to linux

    Hi,
    My requirement is Client will select files from widows and then click zip.In server(linux) i have to get those files and zip.Here i am unable to get the files sent by the client.
    Suppose client will select the file in C:\xxx then click zip.In linux am using request.getParameter() from getting those files.Here in linux it is getting the path of the file as C:\xxx and unable to locate.Giving FIleNotFound Exception.
    How can resolve this issue.
    Regards,
    Babu

    Hi Boss am getting the problem in transfering files from windows to linux.
    In linux it is unable to locate the file which was selected by the client in windows.
    Am using request.getParameter () to get the file.How to solve this.

  • I bought a new laptop and used Windows Easy Transfer cable and moved all files from one computer to another. I installed iTunes and found my iTunes music Library.  However, when I plug in my iPod it says it is already synced with another iTunes Library.

    I bought a new laptop and used Windows Easy Transfer cable and moved all files from one computer to another. I installed iTunes and found my iTunes music Library.  However, when I plug in my iPod it says it is already synced with another iTunes Library. 
    I don't see anything in Help that shows when you already have transfered all the files over.  Why would it want to erase and sync when I already have all the music folder copied over?  I didn't have an issue when I had another technician copy from one laptop to another.  Home sharing is also on but not being recognized.

    I suspect you only migrated the media folder instead of the complete working library. Either review the transfer process and copy over the entire iTunes folder from your old profile's music folder or see Recovering your iTunes library from your iPod or iOS device.
    tt2

  • How i can access the linux shell file from windows platform

    Hey Friends,
    Anyone can tell me that through RMI how i can access the linux shell file or files from windows platform.
    Thanks in advance...

    it happend by mistake......
    sorry allYou've vanished, I checked your posting history and you have posted numerous threads about this problem. I hope you are reading the document that I suggested and will return knowing how to post smart questions. Otherwise you have a long way to go before you qualify for that -ji at the end of your id.

Maybe you are looking for

  • I have jvc gy-hm100 video cam.I would like to know which format is best for final cut pro?

    My camera has a every size of resoloution. From 1080-60/30 to 720-24.It is totally compatiable with FCP.What i would like to know is what format is recomended for music video's and film production.Any info is greatly apprec!!!! Thank you! P.S. Ive be

  • GE70-0ND Screen flashing black and gray

    Hey, I bought a MSI GE70-0ND laptop almost 1 year ago. I have not had any problems with it until now. I run Windows 8 on it. Today when I logged in on my laptop the screen just immediately went black. Now it is flashing black and gray. When I move th

  • Profit Centers & Customer Project

    Hi Experts I have a question in regards to profit center. I have a customer who has multiple org unit each been a profit center & cost center. Within each org unit there are a number of employee. Employees are attached to labor resource rates If you

  • MeetingPlace Video Integration with 3515MCU problem

    Hi, I am trying to setup MeetingPlace Video Integration with a Cisco 3515 MCU and cannot get it to work. The eventlog for MeetingPlace Gateway is giving me errors about the initialization problems. A couple of such errors are: MPAgent (0x0150) Warnin

  • Remove Errors in list

    I made a formula that returns a list, each list item is text type. My problem is, i want to know if there are items that is a number, then I do this: List.Transform([My List], try Number.From otherwise null) The 'try <> otherwise <>' is not working,