Cheatsheet: Difference between revisions
Content added Content deleted
(→Misc) |
(→Misc) |
||
Line 1,122: | Line 1,122: | ||
=== Misc === |
=== Misc === |
||
*CURL |
* CURL |
||
curl -I http://domain.com Get HTTP header information |
curl -I http://domain.com Get HTTP header information |
||
curl -i http://domain.com Get HTTP header + Body information |
curl -i http://domain.com Get HTTP header + Body information |
||
Line 1,154: | Line 1,154: | ||
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' |
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' |
||
* MTR |
|||
*mtr |
|||
Provides the functionality of both the ping and traceroute commands. |
|||
Prints information about the entire route. |
|||
mtr google.com |
|||
*traceroute |
|||
mtr -g google.com Display Numeric IP addresses |
|||
mtr -b google.com Both hostnames and numeric IP addresses |
|||
mtr --tcp google.com Use TCP SYN packets |
|||
mtr --udp google.com UDP datagrams |
|||
* Traceroute |
|||
traceroute 4.2.2.2 ==> Uses UDP |
traceroute 4.2.2.2 ==> Uses UDP |
||
traceroute -n 4.2.2.2 ==> Do not resolve hostnames |
traceroute -n 4.2.2.2 ==> Do not resolve hostnames |
||
sudo traceroute -nI 4.2.2.2 ==> Use ICMP Packets |
sudo traceroute -nI 4.2.2.2 ==> Use ICMP Packets |
||
sudo traceroute -nT 4.2.2.2 ==> Use TCP Syn (Port 80) |
sudo traceroute -nT 4.2.2.2 ==> Use TCP Syn (Port 80) |
||
*Netstat |
*Netstat |
||
Line 1,178: | Line 1,184: | ||
netstat -ant |
netstat -ant |
||
*PS |
* PS |
||
ps -aux Display all processes in BSD format |
ps -aux Display all processes in BSD format |
||
ps -eo pid,ppid,user,cmd |
ps -eo pid,ppid,user,cmd |
||
Line 1,185: | Line 1,191: | ||
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head |
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head |
||
⚫ | |||
⚫ | |||
Append a character to each file name indicating the file type: |
Append a character to each file name indicating the file type: |
||
Line 1,210: | Line 1,214: | ||
*Find Sym Links: |
* Find Sym Links: |
||
find . -type l -ls |
find . -type l -ls |
||
ls -la | grep "\->" |
ls -la | grep "\->" |