linux - Issue with passing find command via ssh -


I am trying to read the contents on specific files. I have several hosts where these files are located I am down during ssh Passing the given commands so that it can run and get the output.

  1. I get the specified errors when using the command given below. (Nothing happens to be sashed to host it)

      $ ssh host "more $ (find / my / path-name" test * ")" Find: 0652-010 Initial Directory Not valid.    

    My / path- Name "test *" -exec more {} \; "

  2. This works as expected when using excerpts

      $ ssh host" find / my / Path -name "test *" | Anyone can tell why the method 1 & 2 is not working?      p> 

    Please note that if I run commands on the remote host, then every method is working. For example, all commands given below are doing the desired work in the remote host.

     < Find the code> more $ (find / my / path -name "test *") / my / path -name "test *" - Exec more {} \: / my / path-name "test *" | xargs more < / code>   

    (1) "... $ (command response Installation) " is being done by your Local Bash Shell, you have to save it so that the " ... $ () " is literally double quoted string Not until the command reaches the remote box:

      ssh ddd @ $ t "more \ $ (find DS-name README)"   

    OR

      ssh ddd @ $ t 'more $ (find DS-name README)'   

    For this (2) Similarly, you Avoid \ , so it has been passed correctly in the remote box:

      ssh ddd @ $ t "DS-NANDADADEX and more {} \\;"   

    OR

      SSH ddd @ $ t 'DS - NANDADXX and more {} \;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -