Support Questions

Find answers, ask questions, and share your expertise

NiFi: Cannot get ExecuteProcess run shell command

avatar
Expert Contributor

I wanted to be able to execute some hdfs shell commands. However, it gives the following error even for the normal file listing. Can you please suggest?

sh: ls -lrt: No such file or directory

executeprocess.jpg

1 ACCEPTED SOLUTION

avatar

Hi Kumar,

You need to set the processor with the following properties

Command: /bin/ls

Arguments: -lrt

It is better to indicate an absolute path for the command.

If you want to indicate a path (example /my/directory) for your listing, that would be:

Command: /bin/ls

Arguments: -lrt|/my/directory

Because the delimiter is configured with | character based on your screenshot.

Hope this helps.

View solution in original post

2 REPLIES 2

avatar

Hi Kumar,

You need to set the processor with the following properties

Command: /bin/ls

Arguments: -lrt

It is better to indicate an absolute path for the command.

If you want to indicate a path (example /my/directory) for your listing, that would be:

Command: /bin/ls

Arguments: -lrt|/my/directory

Because the delimiter is configured with | character based on your screenshot.

Hope this helps.

avatar
Contributor

Hi Pierre, Can you help me on NIFI. NIFI installed on my windows laptop. I am trying to execute a .sh script which hosted on linux machine. Linux machine i can connect with user id and password. How i can do this using NIFI.