1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Random Linux+ Question #35

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

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    You are on the command line and are searching for certain file names in a directory. You know that the command:
    Code:
    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 Administrator Administrator

    6,771
    102
    221
    urm urm urm 1 ???? :blink
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Looking at doing ..................
  3. Jellyman_4eva

    Jellyman_4eva Byte Poster

    213
    4
    34
    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

    13,493
    179
    287
    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

Loading...