Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i tried to run the following command as user1@server1.com:-

run "server_name" 'ls -lt /home/nextag/live' and it gave the following error:- -bash: run: command not found

server1 is a jump server for a list of server_names.

When i changed the user1 to user2 and executed the same command it worked fine. How can i run it for user1??

share|improve this question
    
Tell us where the command run is located on your system. Probabaly not /var/run since both user should have access to that. Maybe in /home/user2/ ? –  Rinzwind Mar 18 '13 at 9:23
    
server_name is a remote system, i am sshing to that server –  vipin8169 Mar 18 '13 at 9:51
    
log in as user2 and execute which run and post the output –  Manula Waidyanatha Mar 18 '13 at 14:38
    
/usr/bin/which: no run in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/ant/bin:/opt‌​/jdk/bin:/usr/home/user2/bin) –  vipin8169 Mar 19 '13 at 5:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.