×

Loading...

Topic

  • 工作学习 / IT技术讨论 / Ask advice from UNix gurus...
    I am using an AIX machine and I frequently issue the following command to search for a word in all the files under the corrent directory:

    find . -name "*" -exec grep -l "xyz" {} \;

    However, I frequently get the following error message:

    grep: 0652-226 Maximum line length of 2048 exceeded.

    Can anybody tell me how to cure it?
    thank you in advance.
    • please try this...
      find . -name "*" -exec \grep -l "xyz" {} \;
      • What's the difference?
        John, I tried your command and it turned out to be the same as mine.
    • It's a limit of AIX. you can try to search only ascii by narrow your search conditions. please check the file command and use it with find command.
      • Thanks a million!
        In fact, I have avoided the issue by using "file manager" in the Hummingbird Exceed. I found that this software can help very much those who are no experts in Unix system.