In today’s chautauqua…

  • 0 Posts
  • 37 Comments
Joined 3 months ago
cake
Cake day: September 15th, 2025

help-circle
  • It might be instance related, I’m on PieFed, so perhaps the markdown implementation is different.

    Also, I realized that the parameter expansion might not be straightforward and added the GNU docs on it, but looks like you found a post about it at the same time! Glad to hear it got you sorted out.


  • phaedrus@piefed.worldtoLinux@lemmy.mlBash scripting question
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    1
    ·
    edit-2
    3 hours ago

    You can do the entire thing as a one-liner using only find:

    find ./ -type f \( -iname "*.jpg" -or -iname "*.png" \) -exec sh -c 'mv "$0" "$(uuidgen -r).${0##*.}"' {} \;  
    

    Test on my machine:

    phaedrus@sys76 ~/D/test> ls -lh  
    total 0  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test1.jpg  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test1.png  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test2.jpg  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test2.png  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test3.jpg  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 test3.png  
    phaedrus@sys76 ~/D/test> find ./ -type f \( -iname "*.jpg" -or -iname "*.png" \) -exec sh -c 'mv "$0" "$(uuidgen -r).${0##*.}"' {} \;  
    phaedrus@sys76 ~/D/test> ls -lh  
    total 0  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 062d8954-9921-42bd-ad24-0e4ed403a5db.jpg  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 111f859f-b1fe-4488-b2bc-75585320e3a3.png  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 39b9fe4e-7a05-43c9-b30a-69e9a13aa3a9.png  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 57bda91e-49e5-43fe-8318-aeeb2e3adde7.png  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 97398eb7-54aa-488f-8fbe-0b84b5e5a50d.jpg  
    -rw-r--r-- 1 phaedrus users 0 Dec  6 01:08 f7a13274-e2c0-4fa7-9907-c590d1280c2e.jpg  
    

    btw, Lemmy doesn’t like language specifiers in the multi-line code blocks, so it’s difficult to read all that in its current form since there are no tabs to know how you have it formatted. Makes it virtually impossible to troubleshoot your specific script.

    edit: further reading on the ever useful variable expansions (${0##*.} portion of my one-liner):
    https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html



  • You don’t host anything with KeePass, it’s an application that you install. People use this type of software literally every single day. I’m not sure where you get your information from. There was no “leak”, it was an attack that someone could execute if they had access to your physical machine and only used a master password without a keyfile. If someone didn’t have that, they don’t have your master password, because it doesn’t go to the cloud at all. It’s all entirely local. Stop handing out misinformation like candy.

    edit: the actual CVE: https://nvd.nist.gov/vuln/detail/CVE-2023-32784

    Vulnerabilities happen, end of story. Like I said, what matters is the maintainers’ reaction and how open they are about the details. If you rely on other people/developers to handle your OpSec for you, then you shouldn’t be using computers at all and are putting yourself at risk no matter what software you use.

    And if this is your litmus test, then holy shit do I have some bad news for you about iOS/Android/Linux/Windows/macOS/literally any web browser… and I guarantee that whatever you use now for your password manager has it’s own share of issues regarding security, which again points back to taking care of your own OpSec instead of relying on others.

    Expect shit to hit the fan, and you’ll always be prepared when it does.




  • SyncThing + KeePass, I’ve been using this setup for a long time. Requires setup and isn’t automagically done for you, but you control everything about it + it’s decentralized and local. I unfortunately don’t have any good guides off-hand, but I can try to give some pointers if you’re interested to know more about it.

    On Linux, the only downside is you can’t use the auto-type feature in Wayland, but there are browser plugins to make it less of an issue.

    Alternatively, if you are a self-hoster, you can still use the BitWarden local clients with an open source backend server that you control: https://github.com/dani-garcia/vaultwarden








  • Not OP, but I also live in the woods (albeit I’m in a 4x4 vehicle and don’t stay in one place for long periods).

    The point for me is not to, and nature is my TV. When I do need internet, though, I’m in town stocking up on supplies or hanging out in a coffee shop.

    Also, though, 5G and the abundance of towers means that hotspots work in a lot more places than they used to. More often than not, my phone still gets data even deep in the middle of nowhere. I’m not doing any gaming or streaming, but again I don’t necessarily want to. It’s just a tool to get information some times and make dumb internet comments.





  • I was in a really bad place, mentally, while on the road a couple years back. Had a dual sport motorbike and decided to be really, really reckless in the middle of the desert in Terlingua, TX. Ended up nose diving into a hole, smashing my face on my windshield, and eating a lot of sand. Busted my goggles, the windshield, and the clutch lever was toast.

    When I finally got up and started to lift my bike off the ground, I found a bunch of peculiar tiny rocks near where I had kicked up all the dust. Ran a magnet over them, and sure enough they were meteorite fragments. Made a necklace out of one and took the others back to camp with me and gave them to my traveling partners at the time.

    If you’re ever in that area, do yourself a favor and check out Agua Fria. Cowboy camping out there is magnificent, and the natural spring it’s named after is, well, very aptly named. Very quiet and it might just change your life.