xargs command not working with ssh
Hello,
I have 2 node host, and I was to run few command from 1st node to 2nd node with the help of xargs command. when I run the below command I get error: ssh localhost find /opt -type f -size +5M -mtime +5 -ls |egrep -i log |awk '{print $NF}' |xargs du -sh du: cannot access ************** its happening with "|xargs gzip " Requesting you to please look into this and do the needful. Regards, Sudhanshu |
Quote:
Code:
find /opt -type f -size +5M -mtime +5 -ls |egrep -i log |awk '{print $NF}' |xargs du -sh Code:
find /opt -type f -size 51M -mtime +5 -iname "*log" -exec du -sh {} \; If this is just an example, have a look at the following for the complete picture: Code:
ssh localhost "find /opt -type f -size +5M -mtime +5 -iname '*log' -exec du -sh {} \;" Quote:
|
Hi Druuna,
thank you very much.. I really appreciate your help. updated command has solved my problem. I have few more more that require you assistance to fix. please provide me with your IM id. Thanks, Sudhanshu |
Quote:
|
Quote:
I'm willing to answer questions here at LQ if I have the time. I will not do one-on-one stuff, no exceptions. TB0ne already answered, but I just wanted to make sure that you understand that this isn't "just" his opinion. |
All times are GMT -5. The time now is 04:09 PM. |