Jump to content

Cheatsheet: Difference between revisions

Line 1,142:
nslookup -debug yahoo.com ==> verbose information like TTL, etc
 
=== MiscCURL ===
 
* CURL
curl -I http://domain.com Get HTTP header information
curl -i http://domain.com Get HTTP header + Body information
Line 1,176 ⟶ 1,174:
curl https://www.booleanworld.com/ -sSo /dev/null -w 'namelookup:\t%{time_namelookup}\nconnect:\t%{time_connect}\nappconnect:\t%{time_appconnect}\npretransfer:\t%{time_pretransfer}\nredirect:\t%{time_redirect}\nstarttransfer:\t%{time_starttransfer}\ntotal:\t\t%{time_total}\n'
 
*=== IPtables ===
 
iptables -L ==> List rules
Line 1,191 ⟶ 1,189:
 
 
*=== TCPDump ===
 
sudo tcpdump -s 0 -i ens160 host 10.1.1.1 -v -w /tmp/packet_capture.cap
Line 1,201 ⟶ 1,199:
 
 
*=== MTR ===
 
Provides the functionality of both the ping and traceroute commands.
Prints information about the entire route.
Line 1,211 ⟶ 1,210:
mtr --udp google.com UDP datagrams
 
*=== Traceroute ===
 
traceroute 4.2.2.2 ==> Uses UDP
traceroute -n 4.2.2.2 ==> Do not resolve hostnames
Line 1,217:
sudo traceroute -nT 4.2.2.2 ==> Use TCP Syn (Port 80)
 
*=== Netstat ===
 
netstat -s
netstat -a Listing all ports (both TCP and UDP)
Line 1,231 ⟶ 1,232:
netstat -ant
 
*=== PS ===
ps -aux Display all processes in BSD format
ps -eo pid,ppid,user,cmd
Line 1,238 ⟶ 1,239:
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head
 
*=== LS ===
 
Append a character to each file name indicating the file type:
Line 1,259 ⟶ 1,260:
-rw-r--r-- 1 root root 0 Sep 13 14:57 mtrr
</pre>
 
 
* Find Sym Links:
find . -type l -ls
ls -la | grep "\->"
 
== Troubleshooting ==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.