enumerate Script
#!/bin/bash
echo "Contents of /var/log:"
ls -la /var/log
echo "Contents of /var/adm:"
ls -la /var/adm
echo "Contents of /var/spool:"
ls -la /var/spool
echo "Last logged in users:"
last
echo "Last logins for all users:"
lastlog
echo "ARP table:"
arp -an
echo "Routing table:"
route print
echo "Network connections:"
netstat -nap
echo "Open files:"
lsof -l
echo "Contents of /etc/passwd:"
more /etc/passwd
echo "Contents of /etc/crontab:"
more /etc/crontab
echo "Contents of /etc/cron.*:"
ls -la /etc/cron.*
echo "Contents of /var/at/jobs:"
ls -la /var/at/jobs
echo "Contents of /etc/resolv.conf:"
more /etc/resolv.conf
echo "Contents of /etc/hosts:"
more /etc/hosts
echo "Verify integrity of installed packages:"
rpm -Va
echo "List of services and their states:"
chkconfig -list
echo "List of running processes:"
ps aux
echo "List of running processes (detailed):"
ps -ef
echo "List files and directories (sorted by modification time, within the last 2 days):"
find / -mtime -2d -ls
echo "List of system users (excluding comments):"
grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1 }'
echo "Information about users currently logged in:"
finger
echo "Information about users currently logged in (compact format):"
pinky
echo "List of currently logged in users:"
users
echo "System activity and login records:"
who -a
echo "Current system status and activity:"
w
echo "List of sudo privileges for the current user:"
sudo -l
echo "List of command history files in the user's home directory:"
ls -la ~/.*_history
echo "List of command history files in the root user's directory:"
ls -al /root/.*_history
echo "Current user's command history:"
history
echo "Contents of current user's bash history:"
cat ~/.bash_history
Last updated