I am using Ubuntu and when I list the libraries under /usr/lib/ I see that some of them have numbers and/or @ symbol at the end. For example libgc.so.1@ or libgettextlib.so@ Does anyone know what this means?
-
1It means that these are symlinks (if you use `ls -l libgc.so.1`, you'll see it pointing to a different name). The `@` is not actually on the end of the filename; it's just displayed by `ls` when given the `-F` option, which some operating systems configure an alias to enable by default. – Charles Duffy Jan 15 '15 at 17:12
-
1As this is more a usage question than a programming question, by the way, a better forum for it would be http://superuser.com/. – Charles Duffy Jan 15 '15 at 17:14
-
How can I carry it there? – lulijeta Jan 16 '15 at 09:28
-
The easy way to migrate the question, at this point, is to wait for more folks to vote to close it via migration. – Charles Duffy Jan 16 '15 at 17:33
1 Answers
The ls
command try to give you some hints about the nature of the names it lists, depending on version of ls
and the options you give to it.
For example a trailing /
is sometimes added to mean that the object is a directory. A trailing @
means that it is a symbolic link. ls -l
will show you the referred file.
What is a symbolic link ? A symbolic link is a file whose content is not data that you can use freely, but the name of another file. So when you try to manipulate the symbolic link, the system manipulates the file that it refers to. This is an indirection. There is also links that are slightly more integrated and invisible to you much more like an alias.
Here is how to experiment
$ touch foo
$ ln -s foo bar
$ ls -l foo bar
lrwxr-xr-x 1 yunes wheel 3 16 jan 10:45 bar -> foo
-rw-r--r-- 1 yunes wheel 0 16 jan 10:45 foo
This means that foo
is a file (empty actually), and bar
is not a regular file but a name that points to foo
. Now:
$ echo "hello" >> foo
$ cat foo
hello
$ cat bar
hello
$
This to show you that using foo
or bar
is almost the same...

- 34,548
- 4
- 48
- 69
-
You might also run `ls -F` to show the sigil added, while demonstrating output from `ls` with various arguments. – Charles Duffy Jan 16 '15 at 17:33