Added in some more command pages
This commit is contained in:
parent
699cfea34a
commit
e114ec4c70
@ -1,53 +0,0 @@
|
||||
# Agit dum sed ille exululat cruorem atque
|
||||
|
||||
## Aequus tanto coercuerat Cephisos de agmine scopulos
|
||||
|
||||
Lorem markdownum fossa inanes factura? Aequore **Eurydicen** que vastius egit.
|
||||
Terrebit umbras in ignotas sub animi dum rursus effigiem enim *vices niveis
|
||||
ponunt* totiens colorem, opus solvi. Metus sub regna nec; sic laeva [hic
|
||||
saetigerosque](http://www.illum.org/) vidi. Nec nec amara Numicius simulasse
|
||||
retro placebant Sabinis dumque refovet.
|
||||
|
||||
Et putando. Advehar sua patre Agaue, praeferrer matres. Igne rectum: natis
|
||||
quiescet in illic rogantem, eiectas maneas, nate signum gloria, magna.
|
||||
|
||||
## Obvia in tantum intumuit
|
||||
|
||||
[Edita Aenea](http://haud.net/) alligat sopor pollicibusque dolor cogitur, arce
|
||||
illa repetam inpetus [capienda amnem proceresque](http://iugulum.io/nec-sic)
|
||||
Latonia ianua **simulavit**! Pectusque iam parva ne tanti perstat et iras deum
|
||||
exercet.
|
||||
|
||||
Posceret succidit habeo partem Troia, non non committere heros induitur. Soror
|
||||
dixerat instruis aufer, ter enim: solis esse praepes abstitimus flammam nequiret
|
||||
orbes.
|
||||
|
||||
## Locus nec
|
||||
|
||||
[Pudetque](http://dempto.net/) natos *pisces Iovis*,; recepit Anaxareten Echecli
|
||||
est evanuit ab. Capellae sed idem caelitibus, aut cavae quem rerum extemplo
|
||||
dedit. Horrida **vae** avis potest dempsisse vitibus requirere mensam, flectit.
|
||||
Mihi *bene*: carerent inposito, mota!
|
||||
|
||||
site_ascii.ipod(macro_wireless_torrent - meta(5, faqNetworkOasis), class(
|
||||
archiveAddress(tebibyte_ddr_webcam), prebinding, maximize_data +
|
||||
hacker), heap_fat + oasis_rpm(remote));
|
||||
web_parse_xp.excelSystem -= fifoHyperOperating(inputVlb, sli) - ospf *
|
||||
virus(frameLeopardBackside);
|
||||
if (baudMasterCgi) {
|
||||
cursorLamp = managementToken(threading, resolution);
|
||||
parse -= xmp;
|
||||
teraflops(linux, toolbarLteAta(bookmark_type_markup, dimm_contextual));
|
||||
}
|
||||
memory(sprite(-5 + 74));
|
||||
|
||||
## Semper ne armarat ecce caput
|
||||
|
||||
Litore agmine, genuisse isto; est morus ferro nomen; membra, **recurvas**? Et
|
||||
modo gratam adsiduis raptos curvarique est, axem dextra malas pruinosas expulit.
|
||||
|
||||
Manu sparsumque colebat quare [te amor iussa](http://tantum.org/dextram)
|
||||
aquaticus huius, quartus nec: quid. Dumque sit reperta, et sint et est cras
|
||||
verba labori his modo fonti nemus Medea; anne tibi Terram. Structis *nobis* mihi
|
||||
mihi mutataeque eiaculatur Minyis. Est quod erat: Apis est est partes vagitus
|
||||
nec pondere *quas* agitante! Facibus exspectatoque; ad in utque ipso arguit?
|
||||
@ -6,4 +6,18 @@
|
||||
|
||||
|
||||
###awk
|
||||
`awk` is used to fuck with data
|
||||
`awk` is used to extract, layout and modify data using the command line (It is way more then this but its all I use it for)
|
||||
|
||||
###sed
|
||||
`sed` is the '**S**tream **ED**itor' you can use to to modify files via commands and scripts using patterns, an [example](examples/seddnszone.md) can be seen here
|
||||
|
||||
|
||||
| Useful Flags | Function |
|
||||
| ------------- |:-------------|
|
||||
| -i | in-place, writes the changes to the file |
|
||||
| -f | Use a script file instead of reading the expression from STDIN |
|
||||
|
||||
|
||||
###grep
|
||||
|
||||
###rev
|
||||
@ -18,5 +18,6 @@ In these situations we will usually see a high connection count for certain serv
|
||||
|
||||
Finding IP addresses connecting to HTTP is quite easy, all you should need to do is tail access logs to find the IP addresses
|
||||
|
||||
You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections to the webistes on the server.w [For more information on the commands used click here](commands.md)
|
||||
You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections via HTTP/HTTPS on the server. [For more information on the commands used click here](commands.md) *__Note: This will only check sites in /home__*
|
||||
|
||||
##SMTP
|
||||
73
docs/examples/seddnszone.md
Normal file
73
docs/examples/seddnszone.md
Normal file
@ -0,0 +1,73 @@
|
||||
#Using `sed` to modify a DNS zone
|
||||
|
||||
Take the following DNS zone as an example, say we needed to update the IP address from 110.232.142.185 to 45.65.88.152, you could modify the file using a text editor (see [editors](/commands#editors))
|
||||
|
||||
```
|
||||
$TTL 86400
|
||||
@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. (
|
||||
2018043009 ;Serial
|
||||
3600 ;Refresh
|
||||
1800 ;Retry
|
||||
604800 ;Expire
|
||||
43200 ;Minimum TTL
|
||||
)
|
||||
;Name Server Information
|
||||
@ IN NS ns1.benjamyn.love.
|
||||
@ IN NS ns2.benjamyn.love.
|
||||
;IP address of Name Server
|
||||
primary IN A 110.232.142.184
|
||||
;A - Record HostName To Ip Address
|
||||
memes.sh. IN A 110.232.142.185
|
||||
www IN A 110.232.142.185
|
||||
;CNAME record
|
||||
ftp IN CNAME memes.sh.
|
||||
```
|
||||
|
||||
In this case we can just use `sed -i s/110.232.142.185/45.65.88.152/g filename`
|
||||
|
||||
The file gets changed to
|
||||
```
|
||||
$TTL 86400
|
||||
@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. (
|
||||
2018043009 ;Serial
|
||||
3600 ;Refresh
|
||||
1800 ;Retry
|
||||
604800 ;Expire
|
||||
43200 ;Minimum TTL
|
||||
)
|
||||
;Name Server Information
|
||||
@ IN NS ns1.benjamyn.love.
|
||||
@ IN NS ns2.benjamyn.love.
|
||||
;IP address of Name Server
|
||||
primary IN A 110.232.142.184
|
||||
;A - Record HostName To Ip Address
|
||||
memes.sh. IN A 45.65.88.152 <--
|
||||
www IN A 45.65.88.152 <--
|
||||
;CNAME record
|
||||
ftp IN CNAME memes.sh.
|
||||
```
|
||||
|
||||
You can also use sed to update things like the serial number using some regex (which will need to be incremented for the DNS zone to be properly synced out)
|
||||
|
||||
The command will look like `sed -i s/.*Serial/" 2019010308 ;Serial"/g filename` (The quotes are to escape the ; character) and when run against the DNS zone it will update will look like
|
||||
|
||||
```
|
||||
$TTL 86400
|
||||
@ IN SOA ns1.benjamyn.love. servers.benjamyn.love. (
|
||||
2019010308 ;Serial <--
|
||||
3600 ;Refresh
|
||||
1800 ;Retry
|
||||
604800 ;Expire
|
||||
43200 ;Minimum TTL
|
||||
)
|
||||
;Name Server Information
|
||||
@ IN NS ns1.benjamyn.love.
|
||||
@ IN NS ns2.benjamyn.love.
|
||||
;IP address of Name Server
|
||||
primary IN A 110.232.142.184
|
||||
;A - Record HostName To Ip Address
|
||||
memes.sh. IN A 45.65.88.152
|
||||
www IN A 45.65.88.152
|
||||
;CNAME record
|
||||
ftp IN CNAME memes.sh.
|
||||
```
|
||||
@ -1,17 +1,11 @@
|
||||
# Welcome to MkDocs
|
||||
# Welcome to the necronomicon
|
||||
|
||||
For full documentation visit [mkdocs.org](https://mkdocs.org).
|
||||
[Klaatu barada nikto](https://www.imdb.com/title/tt0106308/)
|
||||
|
||||
## Commands
|
||||
## What is this?
|
||||
|
||||
* `mkdocs new [dir-name]` - Create a new project.
|
||||
* `mkdocs serve` - Start the live-reloading docs server.
|
||||
* `mkdocs build` - Build the documentation site.
|
||||
* `mkdocs help` - Print this help message.
|
||||
This is a compendium of all the useless facts, tips, tricks and commands that I know, enjoy
|
||||
|
||||
## Project layout
|
||||
##Quick Links
|
||||
|
||||
mkdocs.yml # The configuration file.
|
||||
docs/
|
||||
index.md # The documentation homepage.
|
||||
... # Other markdown pages, images and other files.
|
||||
[Commands](commands)
|
||||
@ -1,7 +1,6 @@
|
||||
site_name: Usefull commands and tips
|
||||
nav:
|
||||
- Home: index.md
|
||||
- About: about.md
|
||||
- Commands: commands.md
|
||||
- Connections: connections.md
|
||||
theme: readthedocs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user