linux - what does the astericks mean at end of ls -l -rwxr-xr-x 1 root root size date file*

07
2014-07
  • MikeiLL

    Every file or link in my CentOS /usr/bin has an astericks at the end of it. None of them do on my local osX server. What does this mean? I have searched google and here specifically with no luck.

    -rwxr-xr-x 1 root root 107104 Nov 11 2010 zipcloak* -rwxr-xr-x 1 root root 2953 Oct 10 2008 zipgrep* -rwxr-xr-x 1 root root 159928 Nov 11 2010 zipinfo* -rwxr-xr-x 1 root root 98584 Nov 11 2010 zipnote* -rwxr-xr-x 1 root root 102680 Nov 11 2010 zipsplit* -rwxr-xr-x 1 root root 1731 May 27 2013 zless* -rwxr-xr-x 1 root root 2605 May 27 2013 zmore* -rwxr-xr-x 1 root root 5246 May 27 2013 znew*

  • Answers
  • Cristian Ciupitu

    That's an indicator showing that the files are executable. From the documentation for ls, section "General output formatting" (info coreutils 'general output formatting'):

    ‘-F’
    ‘--classify’
    ‘--indicator-style=classify’
        Append a character to each file name indicating the file type.
        Also, for regular files that are executable, append ‘*’.
    

    Your system probably has an alias for ls which is expanded to ls -F.

    The ls from Mac OS X has this option too, but you'll have you use it explicitly i.e. run ls -F.

    -F  Display a slash (`/') immediately after each pathname that is a
        directory, an asterisk (`*') after each that is executable, an
        at sign (`@') after each symbolic link, an equals sign (`=') after
        each socket, a percent sign (`%') after each whiteout, and a
        vertical bar (`|') after each that is a FIFO.
    
  • dg99

    GNU ls offers the option -F which causes file names to be suffixed with certain characters indicating the type of file:

       -F, --classify
              append indicator (one of */=>@|) to entries
    

    where * signifies an executable file, / signifies a directory, = signifies a socket, etc. It's likely that the listing command you're using on your CentOS box is aliased to something like /bin/ls -lF. If you type /bin/ls -l /usr/bin on your CentOS box, then the * will disappear.

    Try typing ls -lF on your OSX server and see if that works. Note that the ls that comes with OSX is not GNU ls; it is OpenBSD ls, which might not support -F (I'm not sure). Type man ls on OSX to see what options it supports. (You can also install GNU fileutils on OSX using macports.)


  • Related Question

    linux - what does the asterisk mean after a filename if you do ls -l
  • user155695

    I've done an ls -l inside a directory, and my files are displaying like this :

    james@nevada:~/development/tools/android-sdk-linux_86/tools$ ll
    total 9512
    drwxr-xr-x 3 james james    4096 2010-05-07 19:48 ./
    drwxr-xr-x 6 james james    4096 2010-08-21 20:43 ../
    -rwxr-xr-x 1 james james  341773 2010-05-07 19:47 adb*
    -rwxr-xr-x 1 james james    3636 2010-05-07 19:47 android*
    -rwxr-xr-x 1 james james    2382 2010-05-07 19:47 apkbuilder*
    -rwxr-xr-x 1 james james    3265 2010-05-07 19:47 ddms*
    -rwxr-xr-x 1 james james   89032 2010-05-07 19:47 dmtracedump*
    -rwxr-xr-x 1 james james    1940 2010-05-07 19:47 draw9patch*
    -rwxr-xr-x 1 james james 6886136 2010-05-07 19:47 emulator*
    -rwxr-xr-x 1 james james  478199 2010-05-07 19:47 etc1tool*
    -rwxr-xr-x 1 james james    1987 2010-05-07 19:47 hierarchyviewer*
    -rwxr-xr-x 1 james james   23044 2010-05-07 19:47 hprof-conv*
    -rwxr-xr-x 1 james james    1939 2010-05-07 19:47 layoutopt*
    drwxr-xr-x 4 james james    4096 2010-05-07 19:48 lib/
    -rwxr-xr-x 1 james james   16550 2010-05-07 19:47 mksdcard*
    -rw-r--r-- 1 james james  205851 2010-05-07 19:48 NOTICE.txt
    -rw-r--r-- 1 james james      33 2010-05-07 19:47 source.properties
    -rwxr-xr-x 1 james james 1447936 2010-05-07 19:47 sqlite3*
    -rwxr-xr-x 1 james james    3044 2010-05-07 19:47 traceview*
    -rwxr-xr-x 1 james james  187965 2010-05-07 19:47 zipalign*
    

    What does that asterisk mean?

    I'm also unable to run a particular file, as follows :

    james@nevada:~/development/tools/android-sdk-linux_86/tools$ ./emulator 
    bash: ./emulator: No such file or directory
    

    EDIT : I'm trying to get Eclipse to use emulator, but it keeps complaining the files does not exist, yet it is here?


  • Related Answers
  • Gilles

    Ignacio Vazquez-Abrams has already explained about the *.

    As for the executable-looking emulator that you can't actually execute, this can happen when the dynamic loader requested by emulator doesn't exist. You can check what kind of file emulator is with the command file emulator, and check what dynamic loader and libraries it needs with ldd emulator (any line showing “not found” is something you need to install).

    Given the name of the directory and the size of the file, emulator is probably a Linux x86 binary. I suspect you have an amd64 system. If so, you need to install a runtime environment for 32-bit applications; on Ubuntu, you need the ia32-libs package (and perhaps also ia32-libs-gtk).

    You could also get this error message for a script whose interpreter as indicated in the #! line doesn't exist.

  • Ignacio Vazquez-Abrams

    It means that the file is executable. A classifier is shown when -F is passed to ls via the command line or otherwise.

  • user46971

    From info ls:

    `-F'
    `--classify'
    `--indicator-style=classify'
         Append a character to each file name indicating the file type.
         Also, for regular files that are executable, append `*'.  The file
         type indicators are `/' for directories, `@' for symbolic links,
         `|' for FIFOs, `=' for sockets, `>' for doors, and nothing for
         regular files.
    
  • dk1844

    Ubuntu (12.04, probably other version as well) by default features with

    alias ll='ls -alF'
    

    And as others have explained, -F is responsible for the asterisk.

    Edit: by the way, you are stating you're running ls -l, running ll may not be the same at all.

  • mpez0

    As several others have mentioned, the '-F' option to 'ls' will flag executables with the asterisk. You don't have a -F in your command line, but it is likely that 'ls' has been aliased. You can check for aliases in your shell of choice (in bash, use the built-in command 'alias' to list the aliases), or escape the 'ls' command with a backslash to disable aliasing.