find() command

This is a discussion on find() command within the C Programming forums, part of the General Programming Boards category; how do u use find on the linux command line so i want to find an argument or text on ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    find() command

    how do u use find on the linux command line

    so i want to find an argument or text on any files but im looking for a string of 2 words with a space between them

    find /root/Desktop/ | xargs grep trace_msg


    this can help me find all the files with trace_msg
    but i want to only find files with
    find /root/Desktop/VMainlineV3/fabric/fctl/ | xargs grep void trace_msg
    but it just finds files with words with void or trace_msg how do i group them together so the search is combined and i only get files with
    void trace_msg

  2. #2
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    First off, This should be in tech help.

    Second, man is your friend (and so is man <pgm name> on google).

    Third:

    find <starting path> -name <wild cards allowed filename>

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by kiros88 View Post
    find /root/Desktop/VMainlineV3/fabric/fctl/ | xargs grep void trace_msg
    but it just finds files with words with void or trace_msg how do i group them together so the search is combined and i only get files with
    void trace_msg
    Use quotes:

    grep "void trace_msg"
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help
    By hellBOY in forum C Programming
    Replies: 4
    Last Post: 01-13-2009, 10:59 AM
  2. parsing command line strings
    By John_L in forum C Programming
    Replies: 15
    Last Post: 05-28-2008, 08:26 AM
  3. Initiating command prompt execution
    By bluecoder in forum Windows Programming
    Replies: 2
    Last Post: 07-26-2002, 07:00 PM
  4. builtin command
    By jon21 in forum Linux Programming
    Replies: 1
    Last Post: 04-11-2002, 03:42 AM
  5. Replies: 4
    Last Post: 11-14-2001, 09:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21