Get first and last line of file


bash way
(head -1; tail -1) < /etc/passwd

sed way
sed -n '1p; $p' /etc/passwd

awk way
awk 'NR==1; END { print }' /etc/passwd

Checking Root Account Status

  Checking Local Root Account Status Run sudo passwd -S root : Look for the status letter in the output. An L means the account is locked (...

Mais vistos