Skip Navigation

帖子
2
评论
156
加入于
3 mo. ago

In today's chautauqua...

  • They were always anti-American. The people that have been running this country since its inception are not actually indigenous to the Americas.

  • I once suffered a horrible wretch for an HR manager for ~5 years. When she finally got shitcanned, people were literally skipping through the halls in the engineering wing singing "ding dong! the witch is dead!"

    I'm trying really hard to remember her first name, but I think my psyche has blocked it. Same vibes, though.

    edit: and the name randomly just came back to me with a flash of horror: Jody

  • But that shit stank, this shit dank

  • We always called those Roly-Polys when I was wee lad, and when searching for their wiki page I learned about a ton of funny names.

    You can really learn a lot when you dig through shit(posts).

  • I do a similar thing for code stuffs, generally always make a ~/Git and ~/Godot so I always have a spot for things.

    I also delete most of the auto-created ones if I'm using a DE that does that, because I have my own organization going on with various external/network drives. Only one I have always kept is ~/Downloads.

  • I used to wear too many hats at work, now I wear too many socks at home

  • Cute, so did I!

    My question: Why do you think people are downvoting a legitimate shitpost?

  • Cheese curd for the cheese turd

  • Indeed, folks tend not to look into the docs enough to realize find is a powerful tool on its own!

    I think the other answers were just adhering to the request (trying to troubleshoot the script as is), but I generally go for pragmatism despite not being what was actually requested.

  • Maybe the acid square should be Mimosa hostilis/Peyote instead to keep with the plant theme, but either way that one hits the hardest for me

  • 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.

  • 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

  • Indeed, I was referring to Martin. I'm not holding my breath, as there are supposed to be two more books, but perhaps at least one will appear at some point!

  • The Insect-kindens! And it is quite a lengthy series, at that, if anyone is looking for something new to get into (not to mention he actually finishes series, unlike another fantasy writer...)

    Shadows of the Apt & Tales of the Apt

  • Just for future reference:

    1. There's already an Archive link in the post, which bypasses the paywall and doesn't give the original site any clicks. This also archives the article in general for future consumption in case the OG site takes it down for any reason.
    2. If you run across a post that doesn't have an archive link alongside it, you can make your own by pasting the real link at the end of an Archive URL, like so:

    archive.ph/https://www.nytimes.com/2025/11/29/us/fraud-minnesota-somali.html

    archive.is also works

  • I would much, much rather wake up next to Richard D. James

  • Oh come on, it's just the tip!

  • Not exactly an Android exclusive thing, but I like to play GameBoy ROMs vertical so it feels more like a gameboy color.