Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2019-06-12 12:19:06
Size: 138
Editor: Sciuro
Comment:
Revision 6 as of 2020-02-23 11:11:12
Size: 739
Editor: Sciuro
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Shell examples #acl All:read
#lang en
Line 3: Line 4:
<<TableOfContents()>>

= File operations =
== Change files ==
Change the serial of a zone file. This is for BSD.
{{{
sed -i '' 's/2020022301/2020022302/g' filename
}}}

== Extract files ==
Extract all files out of an image.
{{{
binwalk --dd='.*' file.bin
}}}

= List operations =
Line 4: Line 21:
Sort a list of IP adresses.
Line 7: Line 25:
[[https://www.madboa.com/geek/sort-addr/]] Thanks: [[https://www.madboa.com/geek/sort-addr/]]

= Processes =
== Kill processes ==
Kill your current process.
{{{
kill -9 $$
}}}

= Networking operations =
== Scan PTR records ==
Do a reverse scan of an IP range.
{{{
for i in `seq 1 254`; do host 192.168.1.$i 8.8.8.8; done |grep pointer
}}}

File operations

Change files

Change the serial of a zone file. This is for BSD.

sed -i '' 's/2020022301/2020022302/g' filename

Extract files

Extract all files out of an image.

binwalk --dd='.*' file.bin

List operations

Sort IP adresses

Sort a list of IP adresses.

sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4

Thanks: https://www.madboa.com/geek/sort-addr/

Processes

Kill processes

Kill your current process.

kill -9 $$

Networking operations

Scan PTR records

Do a reverse scan of an IP range.

for i in `seq 1 254`; do host 192.168.1.$i 8.8.8.8; done |grep pointer

Howto/Shell (last edited 2020-03-07 11:05:16 by Sciuro)