File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Original file line number Diff line number Diff line change 2
2
3
3
For running some of these commands, relevant package may need to be installed. It is recommended to run ` man <command> ` if details needed.
4
4
5
- ## To check firewalls
5
+ ## Check firewalls
6
6
7
7
``` sh
8
8
nmap < ip_address>
9
9
nmap -Pn < ip_address> # if ping is not allowed
10
10
```
11
11
12
- ## To check sha256 checksum
12
+ ## Check sha256 checksum
13
13
14
- source : < https://security.stackexchange.com/a/189004/199040 >
14
+ ref : < https://security.stackexchange.com/a/189004/199040 >
15
15
16
16
``` sh
17
- sha256sum < filename> _
17
+ sha256sum < filename>
18
18
```
19
19
20
- ## To check MD5 checksum
20
+ ## Check MD5 checksum
21
21
22
22
``` sh
23
23
md5sum < filename>
24
24
```
25
25
26
- ## To empty a file
26
+ ## Empty a file
27
27
28
28
``` sh
29
29
: > < filename>
33
33
echo > < filename>
34
34
```
35
35
36
- ## To shred a file
36
+ ## Shred a file
37
37
38
38
``` sh
39
39
shred -vzu secrets.json
54
54
docker system df -v
55
55
docker ps -s
56
56
```
57
+
58
+ ## Recover corrupt zsh history file
59
+
60
+ ref: < https://superuser.com/a/957924/412139 >
61
+
62
+ ``` sh
63
+ mv .zsh_history .zsh_history_bad
64
+ strings .zsh_history_bad > .zsh_history
65
+ fc -R .zsh_history
66
+ ```
You can’t perform that action at this time.
0 commit comments