this command will find the largest files on the system and list them in order
find / -mount -type f -ls | sort -rnk7 | head -30 | awk '{printf "%d MB\t%s\n",($7/1024)/1024,$NF}'
return public ipv4 address of NATed device
curl pwnt.pw
return ip and ownership info for an ip address
curl pwnt.pw/ip_address
return ssl cipher check
curl tls.pwnt.pw
top cpu usage
ps aux | head -1; ps aux | sort -rnk3 | head
top mem usage
ps aux | head -1; ps aux | sort -rnk4 | head
sort two file and remove duplicates
sort -u file_name file_name2
list all users with their home directory paths
cut -d: -f1,6 < /etc/passwd | sort
kick an ssh user off a system
who -u
kill -i pid_of_user
limit lsof to a particular directory
lsof +D /usr/lib/locale
what processes are holding a file open?
lsof -t /lib/i386-linux-gnu/libaudit.so.1.0.0
unable to mount a mount point? check what pid is holding it open
lsof | grep mount_point_name
this command will find the largest deleted files that are open
lsof | head -n 1; lsof | grep deleted | sort -u -k8 | sort -nr -k7 | head -n 5
pre-allocate space for a file (faster than dd)
fallocate -l 50G example