>_ IzzyLab

Topic breakdown

A symbolic link is a separate pointer file that stores the path to a target; accessing it is transparently redirected by the system. It is created with the ln command and the -s flag (without it you'd get a hard link — a shared inode, a fundamentally different entity). The target is best given as an absolute path, otherwise the link may "dangle" when the directory changes. A separate skill here is determining the freshest file by modification time (mtime), for which ls can sort its output by time.

What's checked

  1. /root/latest.log is a symbolic link
  2. the link points to the log with the freshest mtime

What it looks like