LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   command line > error (https://www.linuxquestions.org/questions/linux-general-1/command-line-error-63413/)

mrtwice 06-03-2003 10:47 AM

command line '>' (redirect) error
 
I am trying to redirect the output of a command to a file and am getting an error. Anyone have an idea on how to fix it:

Code:

ldapsearch -x -h xxx.xxx.xxx.xxx -w xxxxxx  -b 'cn=Users,DC=mydomain,DC=com' -D "cn=Administrator,cn=Users,dc=mydomain,dc=com"
this command works great and outputs over a thousand records to my screen which doesn't do me a whole lot of good. Now, this command produces this error:

Code:

ldapsearch -x -h xxx.xxx.xxx.xxx -w xxxxxx  -b 'cn=Users,DC=mydomain,DC=com' -D "cn=Administrator,cn=Users,dc=mydomain,dc=com" > output.ldif
ldap_result: Can't contact LDAP server (81)

Any ideas? Is there a different way I could redirect this output to a file. I have also tried >> with no avail.

0x4B 06-03-2003 04:47 PM

try passing it to something like less with | and see if the result is any different (if that works, then may tee would work too). is the command being wrapped onto another line, the shell may be choking because of that. if so, then try putting the command line in a shell script instead


All times are GMT -5. The time now is 02:35 AM.