Professional Web Applications Themes

ssh and compress problem - Linux / Unix Administration

Hi, everyone! Can anyone please help me to resolve the following "ksh: /tmp/CSHM2_P3: cannot open" problem? I have no problem to create empty data file and named pipe on the remote database server by using ssh. /usr/local/bin/ssh -l myao billdev2 /bin/touch /tmp/infranet_cimf_extracts.dat1.Z /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/infranet_cimf_extracts.dat1.Z /usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3 But when I try to run a background job as the following, I get "ksh: /tmp/CSHM2_P3: cannot open" error message. /usr/local/bin/ssh -l myao billdev2 compress < /tmp/CSHM2_P3 > /tmp/infranet_cimf_extracts.dat1.Z & Is there any sytax error? It is ...

  1. #1

    Default ssh and compress problem

    Hi, everyone!

    Can anyone please help me to resolve the following "ksh:
    /tmp/CSHM2_P3: cannot open" problem?

    I have no problem to create empty data file and named pipe on the
    remote database server by using ssh.

    /usr/local/bin/ssh -l myao billdev2 /bin/touch
    /tmp/infranet_cimf_extracts.dat1.Z
    /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777
    /tmp/infranet_cimf_extracts.dat1.Z


    /usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p
    /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3

    But when I try to run a background job as the following, I get "ksh:
    /tmp/CSHM2_P3: cannot open" error message.

    /usr/local/bin/ssh -l myao billdev2 compress < /tmp/CSHM2_P3 >
    /tmp/infranet_cimf_extracts.dat1.Z &

    Is there any sytax error? It is OK if I run "compress </tmp/CSHM2_P3>
    /tmp/infranet_cimf_extracts.dat1.Z &" on the database server.

    Thanks,
    Max
    Max Guest

  2. #2

    Default Re: ssh and compress problem

    In article <aea3ce71.0405232117.21d0b9c0posting.google.com >,
    Max <xiangminyao> wrote:
    [...]
    >/usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p
    >/usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3
    >
    >But when I try to run a background job as the following, I get "ksh:
    >/tmp/CSHM2_P3: cannot open" error message.
    This doesn't happen to be a Linux ox does it? If not, what kind of
    system is it?

    --
    Darren Tucker (dtucker at zip.com.au)
    GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
    usually comes from bad judgement.
    Darren Tucker Guest

  3. #3

    Default Re: ssh and compress problem

    In article <aea3ce71.0405232117.21d0b9c0posting.google.com >,
    [email]xiangminyao[/email] (Max) wrote:
    > Hi, everyone!
    >
    > Can anyone please help me to resolve the following "ksh:
    > /tmp/CSHM2_P3: cannot open" problem?
    >
    > I have no problem to create empty data file and named pipe on the
    > remote database server by using ssh.
    >
    > /usr/local/bin/ssh -l myao billdev2 /bin/touch
    > /tmp/infranet_cimf_extracts.dat1.Z
    > /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777
    > /tmp/infranet_cimf_extracts.dat1.Z
    >
    >
    > /usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p
    > /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3
    >
    > But when I try to run a background job as the following, I get "ksh:
    > /tmp/CSHM2_P3: cannot open" error message.
    >
    > /usr/local/bin/ssh -l myao billdev2 compress < /tmp/CSHM2_P3 >
    > /tmp/infranet_cimf_extracts.dat1.Z &
    >
    > Is there any sytax error? It is OK if I run "compress </tmp/CSHM2_P3>
    > /tmp/infranet_cimf_extracts.dat1.Z &" on the database server.
    The I/O redirection operators are being processed by the local shell,
    not the remote one. You need to quote or escape them if you want those
    characters sent to the remote system.

    --
    Barry Margolin, [email]barmaralum.mit.edu[/email]
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    Barry Margolin Guest

  4. #4

    Default Re: ssh and compress problem

    Barry Margolin <barmaralum.mit.edu> wrote in message news:<barmar-EBE227.10545224052004comcast.dca.giganews.com>...
    > In article <aea3ce71.0405232117.21d0b9c0posting.google.com >,
    > [email]xiangminyao[/email] (Max) wrote:
    >
    > > Hi, everyone!
    > >
    > > Can anyone please help me to resolve the following "ksh:
    > > /tmp/CSHM2_P3: cannot open" problem?
    > >
    > > I have no problem to create empty data file and named pipe on the
    > > remote database server by using ssh.
    > >
    > > /usr/local/bin/ssh -l myao billdev2 /bin/touch
    > > /tmp/infranet_cimf_extracts.dat1.Z
    > > /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777
    > > /tmp/infranet_cimf_extracts.dat1.Z
    > >
    > >
    > > /usr/local/bin/ssh -l myao billdev2 mknod /tmp/CSHM2_P3 p
    > > /usr/local/bin/ssh -l myao billdev2 /bin/chmod 777 /tmp/CSHM2_P3
    > >
    > > But when I try to run a background job as the following, I get "ksh:
    > > /tmp/CSHM2_P3: cannot open" error message.
    > >
    > > /usr/local/bin/ssh -l myao billdev2 compress < /tmp/CSHM2_P3 >
    > > /tmp/infranet_cimf_extracts.dat1.Z &
    > >
    > > Is there any sytax error? It is OK if I run "compress </tmp/CSHM2_P3>
    > > /tmp/infranet_cimf_extracts.dat1.Z &" on the database server.
    >
    > The I/O redirection operators are being processed by the local shell,
    > not the remote one. You need to quote or escape them if you want those
    > characters sent to the remote system.

    Barry,

    After I added quotes, it worked for me. Thanks a lot.

    The following is the command I used.

    /usr/local/bin/ssh -l myao billdev2 "compress < /tmp/CSHM2_P3 >
    /tmp/infranet_cimf_extracts.dat1.Z" &

    I have another question. Do you know how can get remote compress process's PID?

    Thanks,
    Max
    Max Guest

Similar Threads

  1. compress pdf
    By wouterdebo@gmail.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: December 29th, 08:57 AM
  2. ByteArray Compress
    By buabco in forum Macromedia Flex General Discussion
    Replies: 3
    Last Post: April 20th, 11:34 PM
  3. How to Compress with Acrobat CS
    By kieran_kelly@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: May 2nd, 09:16 PM
  4. Compress Movie
    By Patty in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: December 1st, 02:56 AM
  5. Compress/Zip a String
    By http://edealseek.com/newsgroup.html in forum PERL Miscellaneous
    Replies: 3
    Last Post: September 14th, 09:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139