I know this looks like a duplicate, but previously asked questions do not answer my question

so in the shell I go to /home directory and create a directory there calling it play

then I go to this directory /home/play, and create two files, first one is a text file, second is a symbolic link to the terminal called tty

now if I use ls -l I get the following output enter image description here

where as if I put ls -lL I get this enter image description here

what is this difference is supposed to mean? what do the question marks stand for?

  • 1
    "second is a symbolic link to the terminal" -- well that's a bit confusing way of putting it, since that's just a symlink to a file called terminal, not to a terminal or the terminal in the usual sense of the word. A link to /dev/tty would be more like the latter. – ilkkachu May 9 '17 at 12:20

The -L option tells ls to show information for the target of the link, not the link itself. The red of tty usually indicates a broken link, or a link that points to a non-existent file, which is the case here. Since the destination doesn't exist, ls can't figure out the information to display, so it instead displays question marks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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