24

I noticed that /var/spool/nullmailer directory contains a weird trigger entity which is displayed in yellow and has a “|” suffix.

It doesn't seem to be a directory (at least I can't cd into it), and when I try to open it with vi, the console freezes.

What is that thing?

enter image description here

  • 2
    That's a great clickbait title! :D +1 – Gallifreyan Feb 25 '17 at 15:51
41

It is a named-pipe - one of the 7 types of file in Unix. The p in prw--w--w- confirms it is a named-pipe.

You can write to the pipe from one side and read the data from the other side:

$ mkfifo mypipe
$ cat mypipe

In another terminal

$ cat > mypipe
Hello from the other side
What's up?

Whatever you type in here will appear in the other terminal.

l is an alias to ls -CF and ll is alias to ls -alFh.
According to the man page

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

So for a named-pipe | is appended to the filename.

3

You can identify any 'file' on a linux system by using the command file, followed by the file name.

file "trigger"

Would tell you it's a named pipe.

  • 2
    The filename doesn't include the pipe symbol, so it should be file trigger. This can be seen with mkfifo trigger; ll trigger; file "trigger|" – Chai T. Rex Feb 26 '17 at 1:42
  • @ChaiT.Rex good catch, i didn't notice that is just weird formating they have in ls ! – djsmiley2k - CoW Feb 26 '17 at 2:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.