Find the answer to your Linux question:
Results 1 to 5 of 5
Hi I'm poor unix guy, I have the following command. find . -name '*.xml' -exec grep -H aname {} \; Can some one please tell me what does the "\" ...
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2

    [SOLVED] what does the slash mean?

    Hi

    I'm poor unix guy, I have the following command.

    find . -name '*.xml' -exec grep -H aname {} \;

    Can some one please tell me what does the "\" mean.

    Thanks very much

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    I can't say for sure, but usually a forward slash is used as a delimiter to tell text parsers to ignore the next character. For instance, you can use this to create directories with spaces in their names:

    Code:
    mkdir This\ is\ a\ test\ directory/
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    techieMoe,

    You're refering to the backslash not the forward slash. The backslash (\) is known as the escape character. It preserves the literal value of the next character that follows.

    gaot_tt,

    The semi-colon( ; ) usually signifies the end of a command. By placing a backslash in front of it makes it part of the find command which in this case signifies then end of the -exec option.

  4. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by vsemaska View Post
    techieMoe,

    You're refering to the backslash not the forward slash. The backslash (\) is known as the escape character. It preserves the literal value of the next character that follows.
    I can never remember which is which.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2

    Thanks all of you guys.

    I gooled a lot, and finally got an answer here.

    Really appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...