Forrest logo
back to the lastlog tool

lastlog:tldr:a1df2

lastlog: Display records older than 7 days.
$ lastlog --before ${7}
try on your machine

The command "lastlog --before ${7}" is used to view the login records of users who logged into a Linux system before a specific date.

Here is a breakdown of the command:

  • "lastlog" is the command that displays the information about user's last login.
  • "--before" is an option that instructs the "lastlog" command to filter the results based on a specific date.
  • "${7}" is a placeholder for the seventh argument provided to the command when it is executed.

In this context, the command will display the last login details of users who logged in before the date provided as the seventh argument. The date format should typically follow the system's default format, such as YYYY-MM-DD, HH:MM:SS.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lastlog tool