IT Questions and Answers :)

Friday, August 7, 2020

In linux, what command will output the 10 most recently created users?

In linux, what command will output the 10 most recently created users?

  • last /etc/users
  • tail /etc/passwd
  • head /etc/passwd
  • vim /etc/passwd 


EXPLANATION

The "tail" command outputs the last 10 lines of the file that it is passed.
Since Linux stores usernames in the order in which they were created in the file, /etc/passwd/, the command "tail /etc/passwd/" will return the 10 most recently created users

SOURCE

https://shapeshed.com/unix-tail/
Share:

0 comments:

Post a Comment

Popular Posts