Skip to content
Bensuperpc edited this page Sep 30, 2021 · 2 revisions

The commands here only concern my git repositories, there are over 200 scripts in the whole git repository

archlinux

Scripts for Archlinux and Manjaro

archive

audio

Scripts for audio (FFMPEG ...)

cryptography

For cryptography and security

debian

Scripts for Debian and Ubuntu

development

Scripts for C/C++ development and cross platform

docker

file

For file management or backup

game

To create archives of game saves

git

hardware

image

internet

linux

hash

uuid

partition

For creating partitions (encrypted or in RAM for example)

video

For encoding, creating, recording or downloading videos

clean-arch

Clean ArchLinux and Manjaro (Remove old packages...)

$ sudo clean-arch

update-arch

Update ArchLinux and Manjaro

$ sudo clean-arch

extract

Script to extract many type of archive (7z, rar, zip, iso...)

$ extract archive1.zip archive2.7z archive3.rar

extract-audio

Extract audio from video files, with ffmpeg (without re-encoding)

$ extract-audio <input video file with audio> <output audio file>

merge-audio

Merge multiple audio files, with ffmpeg (with re-encoding)

$ merge-audio <input audio file 1> <input audio file 2> <output audio file>
$ merge-audio <input audio file 1> <input audio file 2> <input audio file 3> <output audio file>
$ merge-audio <input audio file 1> <input audio file 2> <input audio file 3> <input audio file 4> <output audio file>

digital-signature-check-RSA

Check document signature with public key and certificate

$ PUBLIC_KEY=mypublic.pem digital-signature-check-RSA <file>

digital-signature-RSA

Generate (and check) certificate with RSA key (and generate hash by rhash)

$ digital-signature-RSA sign <file> <password>
$ PUBLIC_KEY=mypublic.pem digital-signature-RSA check <file>

cryptr

A simple shell utility for encrypting and decrypting files using OpenSSL.

$ cryptr encrypt <file>
$ cryptr decrypt <file.aes>

clean-debian

Clean debian (and ubuntu), remove old packages...

$ sudo clean-debian

update-debian

Update debian (and ubuntu), by apt update and dist-upgrade

$ sudo update-debian

format-code

Format all code recursively with clang-format (C/C++...)

$ format-code # With LLVM style (By default)
$ format-code webkit # Withwebkit
$ format-code my-style.txt # With custom style

cmake-builder

Build cmake project (and create build folder) Can accept cmake arguments

$ cmake-builder # Without argument
$ cmake-builder -DCMAKE_BUILD_TYPE=Release # With argument

ninja-builder

Build cmake project with ninja build (and create build folder) Can accept cmake arguments

$ ninja-builder # Without argument
$ ninja-builder -DCMAKE_BUILD_TYPE=Release # With argument

meson-builder

Build meson project (and create build folder) Can accept meson arguments

$ meson-builder # Without argument

dockcross-builder

Build cmake project with ninja (and create build folder) in docker (cross platform Can accept CMake arguments.

Dockcross images list: android-arm android-arm64 web-wasm linux-x86 linux-x64 linux-mips linux-x64-clang manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-arm64 linux-arm64-musl linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6 linux-armv6-musl linux-armv5 linux-armv5-musl linux-ppc64le linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-s390x

$ dockcross-builder <dockcross image> <CMake arguments>

docker-container-diff

Display and analyse the differences between one or two containers:

  • History
  • Files
  • apt & pip

For local image add: daemon:// For remote image add: remote://

$ docker-container-diff <img1> <img2>
$ docker-container-diff <img>

docker-clean-all

Clean ALL images and data in docker

$ docker-clean-all

docker-clean

Clean old docker images (and without tags)

$ docker-clean

docker-export

Export docker image (without base image)

$ docker-export <image1> <image2> ...

docker-import

Import docker image (without base image)

$ docker-import <image1> <image2> ...

docker-load

Load docker image (with base image)

$ docker-load <image1> <image2> ...

docker-save

Export docker image (with base image)

$ docker-save <image1> <image2> ...

docker-volume-backup

Export volume in tar archive

$ docker-volume-backup <volume name>

docker-volume-restore

Import volume from tar archive

$ docker-volume-restore <volume name>

docker-pull

Pull/Download docker image (alpine, ubuntu...)

$ docker-pull

rsync-archive

Make perfect copy (backup) directory with rsync

$ rsync-archive <source directory> <destination directory>

rsync-check

Make perfect copy (backup) directory with rsync and checksum (Can take many hours with big files)

$ rsync-check <source directory> <destination directory>

rsync-rsa

Make copy directory with rsync and SSH

$ rsync-archive <port> <key-file> <source directory> <destination directory>

compress-max

Compress directory with 7z with maximum settings

$ compress-max <directory>

compress-secu

Compress directory with 7z with maximum settings (but without solid archive, more solid against corruption

$ compress-secu <directory>

disable-baloo

Disable baloo extractor (with KDE plasma)

$ sudo disable-baloo

save-mindustry-linux

Create archive from save files in mindustry in Linux

$ save-mindustry-linux

save-satisfactory-linux

Create archive from save files in satisfactory in Linux

$ save-satisfactory-linux

save-terraria-linux

Create archive from save files in terraria in Linux

$ save-terraria-linux

save-7DaysToDie-linux

Create archive from save files in 7DaysToDie in Linux

$ save-7DaysToDie-linux

git-apply-patch

Apply a git patch(s)

$ git-apply-patch fix1.patch fix2.patch fix3.patch...

git-changelog

Generate git changelog

$ git-changelog

git-clone-all

Clone git repository with all tags, submodules...

$ git-clone-all https://github.com/bensuperpc/scripts.git https://github.com/bensuperpc/scripts.git ...

git-commit-undo

Undo last commit (not push)

$ git-commit-undo

git-commit

Create commit with signature

$ git-commit "title and comment"
$ git-commit "title" "comment"

git-create-patch

Create git patch

Create patch from last commit:

$ git-create-patch

Create patch from last commit to x commit:

$ git-create-patch 5 # HEAD to 5 last commit

Create patch from hash1 or tag1 to hash2 or tag2:

$ git-create-patch v1.0.0 v1.1.0

git-find-big

Display biggest files in git repository

$ git-find-big

git-sync-submodule

Update submodule to latest commit

$ git-sync-submodule

git-update-recursive

Update repository to latest version in remote (with submodule)

$ git-update-recursive

temperature

Get temperature from CPU, HDD ect...

$ temperature

image_jpeg_to_avif_aom

Convert all jpeg to images avif with AOM

$ image_jpeg_to_avif_aom

image_jpeg_to_avif_rav1e

Convert all jpeg to images avif with rav1e

$ image_jpeg_to_avif_rav1e

image_jpeg_to_heic

Convert all jpeg images to heic

$ image_jpeg_to_heic

image_jpeg_to_webp

Convert all jpeg images to webp with cwebp

$ image_jpeg_to_webp

image_png_to_heic

Convert all png images to heic

$ image_png_to_heic

image_png_to_webp

Convert all png images to webp with cwebp

$ image_png_to_webp

sms-free

Send SMS with Free Mobile API (From script to smartphone)

$ sms-free <user> <API key> <Message (in quotes)>

clean-system

Clean linux system (Tested with ArchLinux and Manjaro)

$ sudo clean-system

find-broken-link

Find all broken symbole links

$ find-broken-link

find-duplicate

Find all duplicate files (Calc with sha256)

$ find-duplicate

find-empty

Find all empty files

$ find-empty

history-count

Calculate the number of identical commands in the bash history

$ history-count

make-bootable-usb

Create bootable USB with ISO

$ make-bootable-usb <iso path> <device path (USB ...)>

passwordgen

Generate strong password

$ passwordgen # With 48 chars
$ passwordgen X # With X chars

replace-recursive

Replace string in files recursively

$ replace-recursive <STR1> <STR2> <Extension (wihout point)>

remove-recursive

Replace string in files recursively

$ remove-recursive <Text to remove (Remove line)>

sysinfo

Generate archive with all system info

$ sudo sysinfo

update-grub

Update Grub

$ sudo update-grub

hash_check

Check hash file(s)

$ hash_check <checksums file>

hash_gen

Generate hash of directory

$ hash_gen <directory>

hash

Generate hash of directory

$ hash <directory>

uuid

Generate uuid

$ uuid

uuid-bash

Generate uuid in bash

$ uuid-bash

luks

Make luks (encrypted) partition with password

$ sudo luks <Device> <Label>

mount-ram

Mount directory in RAM

$ mount-ram <path to mount> <size (in MB/Mo)>

add-video-watermark

Add watermark in video

$ add-video-watermark <input video> <text> <output>

add-video-logo

Add logo (ex: .png) in video

$ add-video-logo <input video> <logo> <overlay X (from from the top-left)> <overlay Y (from from the top-left)> <output>

split-video

Split video in part of x time

$ split-video <input video> <time (00:20:00 for parts of 20 minutes)>

merge-audio-video

Merge video and audio (shortest)

$ merge-audio-video <input video> <input audio> <output video>

screen-capture

Screen capture (Video only) with ffmpeg and x11grab

$ screen-capture --output <output file> --preset fast --resolution 1920x1080
$ screen-capture --output <output file> --screen :0 --framerate 60 --lib libx265

More info :

$ screen-capture --help

screen-capture-webcam

Screen capture (Video only) with ffmpeg, x11grab, and webcam

$ screen-capture-webcam <output file>

gource-nvenc

Generate video with all commit and repository evolution (with nvenc)

$ gource-nvenc <output file .mkv>
$ gource-nvenc <input logo file> <output file .mkv>

gource-nvenc-screenless

Generate video with all commit and repository evolution in CLI, without screen (with nvenc and xvfb-run)

$ gource-nvenc-screenless <output file .mkv>
$ gource-nvenc-screenless <input logo file> <output file .mkv>

gource-nvenc-screenless-4k

Generate video with all commit and repository evolution in CLI, without screen (with nvenc and xvfb-run), you need Gource 0.52 or build from source

$ gource-nvenc-screenless-4k <output file .mkv>
$ gource-nvenc-screenless-4k <input logo file> <output file .mkv>

gource-h265

Generate video with all commit and repository evolution (with H265)

$ gource-h265 <output file>

h265-nvenc

Convert video to h265 (with nvenc)

$ h265-nvenc <input file> <output file>

youtube-dl-playlist-full

Download playlist video with best quality

$ youtube-dl-playlist-full <URL>

youtube-dl-playlist-audio

Download playlist audio only with best quality

$ youtube-dl-playlist-audio <URL>