File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed
Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ category : Bash
3+ title : Change a file last update date
4+ ---
5+ It can be useful to change a file last update date, which can be done with ` touch ` :
6+
7+ ``` bash
8+ # To set a date in the past
9+ touch -d " 10 minutes ago" ./example.txt
10+
11+ # To set it to now
12+ touch ./example.txt
13+ ```
Original file line number Diff line number Diff line change 11---
2- category : Tips
2+ category : Bash
33title : Find a machine's IP public address
44sources :
55 - https://ifconfig.me
66---
77For this we can use ` curl ` :
8+
89``` bash
910curl ifconfig.me/ip
1011```
Original file line number Diff line number Diff line change 1+ ---
2+ category : Bash
3+ title : Generate random passwords
4+ sources :
5+ - https://github.com/tytso/pwgen
6+ - https://doc.ubuntu-fr.org/pwgen
7+ ---
8+ The ` pwgen ` command can be used to generate random passwords.
9+
10+ Here's a breakdown of options:
11+ ``` bash
12+ pwgen -s -c -y -1 30 5
13+ │ │ │ │ │ │
14+ │ │ │ │ │ └─── Generate 5 passwords
15+ │ │ │ │ │
16+ │ │ │ │ └─── Each password is 30 characters long
17+ │ │ │ │
18+ │ │ │ └─── Print one password per line
19+ │ │ │
20+ │ │ └─── Include at least one special character
21+ │ │
22+ │ └─── Include at least one capital letter
23+ │
24+ └─── Generate secure, completely random passwords
25+ ```
You can’t perform that action at this time.
0 commit comments