Random Linux+ Question #35

Discussion in 'Linux+' started by tripwire45, Jul 20, 2005.

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    You are on the command line and are searching for certain file names in a directory. You know that the command:
    ls te[stf]*
    will return with all files in the directory beginning with the letters "te" and containing any of the characters in the brackets, then anything afterwards. You want to search for all files in this directory that begin with "te" but do not contain the letter "f" in the file name and then anything afterwards. Of the selections below, which would be the proper command? Select only one answer.

    1. ls te[#f]*
    2. ls te[!f]*
    3. ls te[&f]*
    4. ls te[^f]*
    5. ls te[<f]*
    6. ls te[>f]*

    Answer later.
    Certifications: A+ and Network+
  2. AJ

    AJ 01000001 01100100 01101101 01101001 01101110 Administrator

    urm urm urm 1 ???? :blink
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Breathing in and out, but not out and in, that's just wrong
  3. Jellyman_4eva

    Jellyman_4eva Byte Poster

    I say 2...

    Just because I remember that in C++ and VB != means not equal to, so I take it the ! means not?!
    Certifications: MCDST, MCITP-EDST/EDA/EA/SA/ MCSA 2K3/2K8, MCSE+M 2K3/2K8, ISA/TMG, VCP3/4, CCNA, Exchange, SQL, Citrix, A+, N+, L+, Sec+, Ser+, JNCIA-SSL, JNCIS-SSL
    WIP: Lots
  4. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    Answer time. Jellyman nailed it. The answer is #2. The "!" symbol between the brackets means that you want the search pattern to return a result with none of the characters (in this case "f") to be returned.
    Certifications: A+ and Network+

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.