37
submitted 1 month ago* (last edited 1 month ago) by ALoafOfBread@lemmy.ml to c/linux@lemmy.ml

Does anybody else have a library of saved commands/scripts? What's in it? How do you organize it? Is there anything you'd want to share that other people might find helpful?

I do. I keep it in VS Code and store complicated (for me) stuff that I can't remember or worry I might not.

  1. Playlist download with yt-dlp with all my best settings, adding playlist index as track number.

  2. Ffmpeg metadata cleaner for music. Searching title for a bunch of specific strings to remove, setting the band, album, etc. and saving these in a new folder.

  3. Desktop file contents for when I need to create one for an appimage

  4. The script I used to bind audio output switching to a hotkey

  5. How to use ADB for when android blocks sideloading the normal way and I inevitably forget what Android Debug Bridge is or how to use it.

Linux Mint btw. Also yes, I am a noob.

you are viewing a single comment's thread
view the rest of the comments
[-] thingsiplay@lemmy.ml 4 points 1 month ago* (last edited 1 month ago)

I do write scripts and commands (and Bash aliases or functions) all the time. The scripts live in ~/.local/bin and are executable like any other program, as that directory is in my PATH variable. I have a projects directory where I archive them, and some of them are uploaded to my Github account. Some of them are later rewritten in Python and get a life on its own.

  1. yt-dlp-lemon: Simple wrapper to yt-dlp with only a subset of options.
  2. unwrap: Wrapper to marry GNU Parallel and 7-Zip for archive extraction.
  3. biggest: List biggest files and folders.
  4. ?: cheat .sh - The only cheat sheet you need. (Note, commands name is just ?)
  5. woman: Preview list for man documents.

Besides my more simple scripts and aliases and functions.

6. system update and all updates:

alias update='eos-update --yay'
alias updates='eos-update --yay ;
  flatpak update ; 
  flatpak uninstall --unused ; 
  rustup self update ; 
  rustup update'

7. Or a recent script to convert files to mp3 format: tomp3

#!/usr/bin/env bash

for file in "${@}"; do
    output="${file%.*}.mp3"
    if [[ -f "${output}" ]]; then
        continue
    fi
    ffmpeg -i "${file}" -b:a 320k "${output}"
done

[-] fozid@feddit.uk 2 points 1 month ago

That's so clever yet so simple, keep all the scripts in folder that's in PATH. I will deffo use that idea instead of a dedicated folder called scripts in my home folder.

[-] ScoffingLizard@lemmy.dbzer0.com 1 points 1 month ago

I wonder if this could solve my Jellyfin format problems.

this post was submitted on 01 Apr 2026
37 points (100.0% liked)

Linux

65224 readers
744 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS