mirror of
https://github.com/trimstray/the-book-of-secret-knowledge.git
synced 2024-12-24 04:15:29 +00:00
commit
b2f8d4f258
33
README.md
33
README.md
@ -1232,6 +1232,7 @@ CyberTalks</b></a> - talks, interviews, and article about cybersecurity.<br>
|
|||||||
* [kill](#tool-kill)
|
* [kill](#tool-kill)
|
||||||
* [find](#tool-find)
|
* [find](#tool-find)
|
||||||
* [diff](#tool-diff)
|
* [diff](#tool-diff)
|
||||||
|
* [vimdiff](#tool-vimdiff)
|
||||||
* [tail](#tool-tail)
|
* [tail](#tool-tail)
|
||||||
* [cpulimit](#tool-cpulimit)
|
* [cpulimit](#tool-cpulimit)
|
||||||
* [pwdx](#tool-pwdx)
|
* [pwdx](#tool-pwdx)
|
||||||
@ -1830,6 +1831,38 @@ diff <(cat /etc/passwd) <(cut -f2 /etc/passwd)
|
|||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
|
##### Tool: [vimdiff](http://vimdoc.sourceforge.net/htmldoc/diff.html)
|
||||||
|
|
||||||
|
##### Highlight the exact differences, based on characters and words
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vimdiff file1 file2
|
||||||
|
```
|
||||||
|
###### Compare two JSON files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vimdiff <(jq -S . A.json) <(jq -S . B.json)
|
||||||
|
```
|
||||||
|
|
||||||
|
###### Compare Hex dump
|
||||||
|
```bash
|
||||||
|
d(){ vimdiff <(f $1) <(f $2);};f(){ hexdump -C $1|cut -d' ' -f3-|tr -s ' ';}; d ~/bin1 ~/bin2
|
||||||
|
```
|
||||||
|
|
||||||
|
###### diffchar
|
||||||
|
|
||||||
|
Save [diffchar](https://raw.githubusercontent.com/vim-scripts/diffchar.vim/master/plugin/diffchar.vim) @ `~/.vim/plugins`
|
||||||
|
|
||||||
|
Click `F7` to switch between diff modes
|
||||||
|
|
||||||
|
Usefull `vimdiff` commands:
|
||||||
|
|
||||||
|
* `qa` to exit all windows
|
||||||
|
* `:vertical resize 70` to resize window
|
||||||
|
* Set window width `Ctrl+W [N columns]+(Shift+)<\>`
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
##### Tool: [tail](https://en.wikipedia.org/wiki/Tail_(Unix))
|
##### Tool: [tail](https://en.wikipedia.org/wiki/Tail_(Unix))
|
||||||
|
|
||||||
###### Annotate tail -f with timestamps
|
###### Annotate tail -f with timestamps
|
||||||
|
Loading…
Reference in New Issue
Block a user