user user - 2 months ago 12
Linux Question

Can't run a file that exist

Can't run a file that exist. I am unsure why this is giving me an error.
At the moment I am trying to fix this issue However, I can't seem to get pass this step.

a@a-VirtualBox:~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/sbin$ ls
distribute-exclude.sh kms.sh start-balancer.sh stop-balancer.sh yarn-daemons.sh
hadoop-daemon.sh mr-jobhistory-daemon.sh start-dfs.sh stop-dfs.sh
hadoop-daemons.sh refresh-namenodes.sh start-secure-dns.sh stop-secure-dns.sh
hdfs-config.sh slaves.sh start-yarn.sh stop-yarn.sh
httpfs.sh start-all.sh stop-all.sh yarn-daemon.sh
a@a-VirtualBox:~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/sbin$ mr-jobhistory-daemon.sh start historyserver
mr-jobhistory-daemon.sh: command not found
a@a-VirtualBox:~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/sbin$ hdfs dfs mr-jobhistory-daemon.sh start historyserver
mr-jobhistory-daemon.sh: Unknown command

Answer

Maybe you should run this command like this:

./mr-jobhistory-daemon.sh

or like this:

PATH=$PATH:`pwd` mr-jobhistory-daemon.sh

The second one cannot collide with another programs that could be in "/usr/bin" for example.

Comments