Below is the command I tried executing, without success:
exec(\'ln -s \' . PLUGIN_DIR . \'/.htaccess \' . ABSPATH . \'/.htaccess\');
When y
You can receive the output result of the exec function by passing an optional second parameter:
exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess',$output); var_dump($output);