Linux OR macOS Commands

Check all users have any cron job

for user in $(cut -f1 -d: /etc/passwd); do echo "> User: " $user; crontab -u $user -l; done

Find big 50 files or folders from your current directory

find -type f -exec du -Sh {} + | sort -rh | head -n 50

Check disk uses

df -h

Check RAM and SWAP memory uses

free -h

Check CPU details


Check CPU and memory utilization with process name


Login to the server using the SSH command

# change ~/file.pem with your .pem file path
# change ubuntu with your user name
# change with your public ip address

# login with username and pem file

ssh -i ~/file.pem ubuntu@

# login with username and password

ssh ubuntu@

Leave a Reply