Which WiFi-Direct commands can be used in Android? I am interested to know what commands can be used in Android to control WiFi direct from the terminal/command line. I took a look into p2p WIFI direct but I didn't catch these commands!!

I can find commands used with Linux from this link. Can the same be used with Android? If so, how can I access them on a rooted device?
On some devices which do support WiFi-Direct, the corresponding binaries come pre-installed (e.g. the wpa_cli command; see also How can I install wpa_cli on my rooted device?). If you have those ready, you can use them on your Android device as you would do on a Linux machine (find a closer description e.g. in the blog post How To : Use wpa_cli To Connect To A Wireless Network).

Of course that would require a terminal emulator to be installed on your device (take e.g. a look at Android Terminal Emulator for a good candidate) -- at least if you want to issue the commands directly.

As the linked "How To" describes, you can use wpa_cli in interactive mode (by directly executing it). On the "wpa_cli shell" you then can execute different commands: scan scans for available networks, with add_network you can select an available network to configure with set_network. An example could look like this:

&gt; add_network
0
&gt; set_network 0 ssid "WLAN-Network"
&gt; set_network 0 psk "SupahSecretPassphrase"


This would trigger a connection phase, which could look like:

&gt; &lt;2&gt;Trying to authenticate with 00:55:ab:25:ac:5a (SSID='WLAN-Network' freq=2437 MHz)
&gt; &lt;2&gt;Trying to associate with 00:55:ab:25:ac:5a (SSID='WLAN-Network' freq=2437 MHz)
&gt; &lt;2&gt;Associated with 00:55:ab:25:ac:5a
&gt; &lt;2&gt;WPA: Key negotiation completed with 00:55:ab:25:ac:5a [PTK=CCMP GTK=CCMP]
&gt; &lt;2&gt;CTRL-EVENT-CONNECTED - Connection to 00:55:ab:25:ac:5a completed (reauth) [id=0 id_str=]


Another good source to take a look at is Android from the command-line, which gives some more examples -- not only restricted to WiFi.