GitHub - tocic/scripts: Useful bash scripts for Linux
Collection of useful bash scripts for Linux.
echo "sleep 100" > test.sh && chmod +x test.sh detach ./test.sh && display_process_info "slee" create_tarball "test.tar.gz" ./test.sh && extract_tarball "test.tar.gz" . translate_selection --help && update_aur -h check_laptop_mode backup_home --version && backup_packages -V browse_processes_and_threads
Installation
Each script is versioned separately and is released into the public domain, so you can install only the ones you need. You can just copy-paste a script or several scripts from the GitHub UI or use any of the following commands.
-
for the script
common/create_tarball:-
via
wget:wget https://raw.githubusercontent.com/tocic/scripts/main/common/create_tarball
-
via
curl:curl -O https://raw.githubusercontent.com/tocic/scripts/main/common/create_tarball
-
-
for all the scripts in the category/directory
common:-
via
subversion:git svn clone https://github.com/tocic/scripts/trunk/common
-
via third-party services:
Note
These services download files as a ZIP archive. Use any utility like unzipto extract the files.
-
Alternatively, you can download all the scripts at once on the Releases page.
|
Tip |
Since git allows storing regular files only with 755 or 644
permissions, all the scripts are stored with 755 permissions, so you don’t have to chmod +x manually.
But you might consider changing the script’s permissions and/or UID/GID if, for example, you want to remove the ability
to execute the script by all users of the system.
|
Additionally, all dependencies of the executable script must be installed.
You can find them in the script file directly or via the script common/list_script_dependencies.
list_script_dependencies [--optional] SCRIPT_FILE_PATH
|
Note |
Dependency package names are taken from the Arch Linux official repositories.
You can search for the names here to find the equivalent for your package manager.
Most likely, the files from coreutils and util-linux are already installed on your system.
|