-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalways_forget.txt~
More file actions
60 lines (51 loc) · 2.4 KB
/
always_forget.txt~
File metadata and controls
60 lines (51 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#Linux commands cheat sheet
# Files and folders
ls #list files and folders
cat filename #View the contents of a file on the terminal
less filename #View the contents of the file one page at a time
mkdir foldername #Make a new folder
touch filename #Make a new file
cd folder/file #Change directory
cd .. #Go back one step
wc filename #Word-count
wc -l filename #Number of lines
grep command filename #Search for the command in the text file
#emacs
emacs filename #Enter emacs mode
Ctrl-X + Ctrl-C #Exit emacs
#WHAT IS MY IP
35.2.224.196 #My ip-address
#Miscallaneous keyboars shortcuts
options + command + u #View source code in browser
lnyx url #View webpage on terminal
wget url #Dowloads webpage in the form of html files for you
curl url #All the html dumped to the terminal
curl url > /dev/null #View stderr. The webpage is dumped to dev/null
curl --verbose url > /dev/null #Details about the request response cycle
#Notes
Defualt http port: 80
Defualt https port: 443
Check if a port is open(netcap): nc -v -z url 80
Port scanning: nmap url (Use with CAUTION: Servers can blacklist)
Compute absolute path: jinja2 url_for() - Find exact command TBD
#Manual request-response cycle
telnet url #port
GET /index.html HTTP/1.0
# Command line fun
cowthink # ascii art of a fow w/ thought bubble
cowsay STRING # ascii art of a cow w/ speech bubble
cowsay -f tux # ^^^ penguin
cowsay -l # list characters
fortune # print a random adage
fortune | cowsay # ascii art + random adage
sl # steam locomotive
asciiquarium # ascii art animated aquarium
telnet towel.blinkenlights.nl # ascii animated Start Wars C-] to quit
rig # generate random fake identities
rev <<< "go hang a salami im a lasagna hog" # palindrome
figlet STRING # print ascii bubble text
lolcat # rainbow colors (gem install lolcat)
curl http://wttr.in/ann_arbor # ascii weather report
curl wttr.in/:help # ascii weather report help
curl wttr.in?0 # ascii weather report, only current
curl wttr.in?n # ascii weather report, narrow width