7

When I do an ls in the /proc/PID directory a number of @ symbols show up next to the file names. Normally I would consider this to mean extended attributes but when I do the long form of ls they do not show up in the place I would expect and the output looks different than usual. I tried googling but only found the extended attributes description. What is going on?

root@hashcat:/proc/29286/ns# l
ipc@  mnt@  net@  pid@  user@  uts@
root@hashcat:/proc/29286/ns#
root@hashcat:/proc/29286/ns# ls -l
total 0
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 net -> net:[4026531956]
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 pid -> pid:[4026531836]
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 user -> user:[4026531837]
lrwxrwxrwx 1 dylan dylan 0 Mar 21 21:09 uts -> uts:[4026531838]
Anthon
  • 78,313
  • 42
  • 165
  • 222
Dylan
  • 1,018
  • 2
  • 10
  • 19

1 Answers1

9

Per default ls does not print those classifiers. Most probably you are using an alias referring to ls -F. (You can use type ls or type l to check.)

The -F option is documented in 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.  Do not follow symbolic links listed on the command
     line unless the ‘--dereference-command-line’ (‘-H’),
     ‘--dereference’ (‘-L’), or
     ‘--dereference-command-line-symlink-to-dir’ options are specified.

Therefore the entries with a @ are symlinks. Actually a symlink stores only an arbitrary string, that usually is the name of another file, but in your case the kernel just inserts a description containing an internal id.

michas
  • 21,190
  • 4
  • 63
  • 93