Skip to content

Commit 85ad9bb

Browse files
committed
Update documentation N11
Update documentation N11 Signed-off-by: Bensuperpc <[email protected]>
1 parent a8004bb commit 85ad9bb

File tree

2 files changed

+110
-5
lines changed

2 files changed

+110
-5
lines changed

Commands.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,29 @@
7777
## linux
7878

7979
- [`clean-system`](#clean-system)
80+
- [`find-broken-link`](#find-broken-link)
81+
- [`find-duplicate`](#find-duplicate)
82+
- [`find-empty`](#find-empty)
83+
- [`history-count`](#history-count)
84+
- [`make-bootable-usb`](#make-bootable-usb)
85+
- [`passwordgen`](#passwordgen)
86+
- [`replace-recursive`](#replace-recursive)
87+
- [`sysinfo`](#sysinfo)
88+
- [`update-grub`](#update-grub)
89+
90+
91+
8092

8193
## hash
8294

8395
- [`hash_check`](#hash_check)
8496
- [`hash_gen`](#hash_gen)
8597
- [`hash`](#hash)
8698

99+
## uuid
100+
101+
- [`uuid`](#uuid)
102+
- [`uuid-bash`](#uuid-bash)
87103

88104
### clean-arch
89105

@@ -445,6 +461,79 @@ Clean linux system (Tested with ArchLinux and Manjaro)
445461
$ sudo clean-system
446462
```
447463

464+
### find-broken-link
465+
466+
Find all broken symbole links
467+
468+
```bash
469+
$ find-broken-link
470+
```
471+
472+
### find-duplicate
473+
474+
Find all duplicate files (Calc with sha256)
475+
476+
```bash
477+
$ find-duplicate
478+
```
479+
480+
### find-empty
481+
482+
Find all empty files
483+
484+
```bash
485+
$ find-empty
486+
```
487+
488+
### history-count
489+
490+
Calculate the number of identical commands in the bash history
491+
492+
```bash
493+
$ history-count
494+
```
495+
496+
### make-bootable-usb
497+
498+
Create bootable USB with ISO
499+
500+
```bash
501+
$ make-bootable-usb <iso path> <device path (USB ...)>
502+
```
503+
504+
### passwordgen
505+
506+
Generate strong password
507+
508+
```bash
509+
$ passwordgen # With 48 chars
510+
$ passwordgen X # With X chars
511+
```
512+
513+
### replace-recursive
514+
515+
Replace string in files recursively
516+
517+
```bash
518+
$ replace-recursive <STR1> <STR2> <Extension (wihout point)>
519+
```
520+
521+
### sysinfo
522+
523+
Generate archive with all system info
524+
525+
```bash
526+
$ sudo sysinfo
527+
```
528+
529+
### update-grub
530+
531+
Update Grub
532+
533+
```bash
534+
$ sudo update-grub
535+
```
536+
448537
### hash_check
449538

450539
Check hash file(s)
@@ -468,3 +557,19 @@ Generate hash of directory
468557
```bash
469558
$ hash <directory>
470559
```
560+
561+
### uuid
562+
563+
Generate uuid
564+
565+
```bash
566+
$ uuid
567+
```
568+
569+
### uuid-bash
570+
571+
Generate uuid in bash
572+
573+
```bash
574+
$ uuid-bash
575+
```

linux/replace-recursive.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set -euo pipefail
1111
#// //
1212
#// Script, 2021 //
1313
#// Created: 29, July, 2021 //
14-
#// Modified: 29, July, 2021 //
14+
#// Modified: 01, August, 2021 //
1515
#// file: - //
1616
#// - //
1717
#// Source: - //
@@ -20,12 +20,12 @@ set -euo pipefail
2020
#// //
2121
#//////////////////////////////////////////////////////////////
2222

23-
if (( $# == 2 )); then
23+
if (( $# == 3 )); then
2424
Var1="$1"
2525
Var2="$2"
26-
27-
find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(nproc)" -I{} sed -i "s|$Var1|$Var2|g" "{}"
26+
Var3="$3"
27+
find . -type f \( -name "*.$Var3" -o -name "*.$Var3" \) -print0 | xargs -0 -P"$(nproc)" -I{} sed -i "s|$Var1|$Var2|g" "{}"
2828
else
29-
echo "Usage: ${0##*/} <STR1> <STR2>"
29+
echo "Usage: ${0##*/} <STR1> <STR2> <Extension (wihout point)>"
3030
exit 1
3131
fi

0 commit comments

Comments
 (0)