Support Questions
Find answers, ask questions, and share your expertise

NiFi: Cannot get ExecuteProcess run shell command

Solved Go to solution

NiFi: Cannot get ExecuteProcess run shell command

Rising Star

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

Accepted Solutions

Re: NiFi: Cannot get ExecuteProcess run shell command

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

Re: NiFi: Cannot get ExecuteProcess run shell command

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

Re: NiFi: Cannot get ExecuteProcess run shell command

Explorer

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.