Link to home
Start Free TrialLog in
Avatar of Member_2_7966113
Member_2_7966113

asked on

How to run a Linux Command from a different other than Root in Linux

Hello Experts,

I would like to run the following script from a directory other than root:

./wrapper-linux -m ./i86bi-linux-l3-adventerprisek9-15.4.1T.bin -p 2001 -- 1 > /dev/null 2>&1 & sleep 5

I would like to run this script in Linux from a directory called LAN, so tried

./LAN ./wrapper-linux -m ./i86bi-linux-l3-adventerprisek9-15.4.1T.bin -p 2001 -- 1 > /dev/null 2>&1 & sleep 5

The only way to run the script is go enter the directory where the wrapper-linux file is (LAN) and run it from there.

Any thoughts?

Cheers

Carlton
Avatar of gheist
gheist
Flag of Belgium image

(cd directory ; ./wrapper bin ) &
Avatar of Member_2_7966113
Member_2_7966113

ASKER

Thanks for responding. I'm a complete novice to Linux, (never had to use it before). Attached is the script that I'm trying to run from a directory called Are you suggesting that I simply add CD; ./wrapper-linux -m ./i86bi-linux-l3-adventerprisek9-15.4.1T.bin -p 2001 -- 1 > /dev/null 2>&1 & sleep 5 to script?
ROUTE
Sorry I meant simply add:
CD; LAN  ./wrapper-linux -m ./i86bi-linux-l3-adventerprisek9-15.4.1T.bin -p 2001 -- 1 > /dev/null 2>&1 & sleep 5  to the end of the script?
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Gerwin, this seemed to fix the problem