Results 1 to 5 of 5

Thread: File named "[" in /usr/bin

  1. #1
    Join Date
    Oct 2013
    Beans
    8

    File named "[" in /usr/bin

    I found a file named "[" in the /usr/bin directory. Performing a file on this gives: "[: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x6cd5d3670a4730dab4dd427c82783e01eccf922b, stripped"

    Does anyone know if this is a legitimate file? I've never seen a file name like this.

    I'm running a System 76 Bonobo with 13.04.

    Thanks....

  2. #2
    Join Date
    Apr 2012
    Beans
    6,966

    Re: File named "[" in /usr/bin

    I think it provides the shell test operator - for shells that don't have [ as a builtin

    Code:
    man [
    
    help [

  3. #3
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: File named "[" in /usr/bin

    It is part of the coreutils package. It is similar to the test(1) command (which is also in the coreutils package), but its last argument must be a literal `]'.

  4. #4
    Join Date
    Oct 2013
    Beans
    8

    Re: File named "[" in /usr/bin

    OK, thanks for that information. I'm glad I didn't delete it....

  5. #5
    Join Date
    Dec 2007
    Beans
    9,949
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: File named "[" in /usr/bin

    Another initial step is to open a terminal and run type [ or whichever file you want to know a little more about.
    Code:
    $ type [
    [ is a shell builtin
    $ type cd
    cd is a shell builtin
    $ type [[
    [[ is a shell keyword

Bookmarks

Posting Permissions

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