Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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.