• 9 Posts
  • 152 Comments
Joined 2 years ago
cake
Cake day: February 17th, 2024

help-circle

  • I did initially, but then changed my setup a little bit.

    My rpi (4b, I think it’s 8GB, but it might be 16. I don’t remember). Also serves as my on site backup for my media. So Jellyfin is connected to the NAS, and the rpi has two drives in a toaster and I have a cron job that syncs new media from the nas to the rpi whenever I add new stuff.

    So kodi is direct playing from the hdds in the toaster.







  • edit: jfc, typos. I hate typing on phone keyboards.

    Secondary to that is that getting bluray to work on a computer is a pain. It’s not impossible, but its not natively supported on macos or Linux (I dont know about windows, haven’t used it in ages now).

    Whereas if you do use the alternative methods, you don’t have to fight with trying to get the os you’re using to work with bluray





  • find /path/to/starting/dir -type f -regextype egrep -regex 'some[[:space:]]*regex[[:space:]]*(goes|here)' -exec mv {} /path/to/new/directory/ \;
    

    I routinely have to find a bunch of files that match a particular pattern and then do something with those files, and as a result, find with -exec is one of my top commands.

    If you’re someone who doesn’t know wtf that above command does, here’s a breakdown piece by piece:

    • find - cli tool to find files based on lots of different parameters
    • /path/to/starting/dir - the directory at which find will start looking for files recursively moving down the file tree
    • -type f - specifies I only want find to find files.
    • -regextype egrep - In this example I’m using regex to pattern match filenames, and this tells find what flavor of regex to use
    • -regex 'regex.here' - The regex to be used to pattern match against the filenames
    • -exec - exec is a way to redirect output in bash and use that output as a parameter in the subsequent command.
    • mv {} /path/to/new/directory/ - mv is just an example, you can use almost any command here. The important bit is {}, which is the placeholder for the parameter coming from find, in this case, a full file path. So this would read when expanded, mv /full/path/of/file/that/matches/the/regex.file /path/to/new/directory/
    • \; - This terminates the command. The semi-colon is the actual termination, but it must be escaped so that the current shell doesn’t see it and try to use it as a command separator.