Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for more

March 6, 2019

Lastlog

Lastlog displays the latest login information of all users in the system. You can’t view the lastlog file since it’s not an ascii file. You’ll need to run the actual command to view what’s in it. The program will spit out a list that may be longer than your terminal buffer. In that case, it’s best to pipe the output to “more” or better yet, use the “grep” command to isolate the user.

lastlog | more
lastlog | grep johndoe

lastlog | more lastlog | grep johndoe

March 1, 2019

Scan for Error, Warning and Panic

Here’s a command to scan for any errors, warnings and panics on the system. If the file is too large, pipe it to more.

sudo grep -E -i -r 'error|warning|panic' /var/log
sudo grep -E -i -r 'error|warning|panic' /var/log >error-warning-panic.log
cat error-warning-panic.log | more

sudo grep -E -i -r 'error|warning|panic' /var/log sudo grep -E -i -r 'error|warning|panic' /var/log >error-warning-panic.log cat error-warning-panic.log | more

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021