Multiple choice technology programming languages

Which file test can be done to see if a file is a socket?

  1. -s

  2. -l

  3. -S

  4. -k

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Unix and Linux shell scripting, the file test operator -S is specifically used to check if a given file is a socket. The operator -s checks if a file has a size greater than zero, while -l checks for a symbolic link.