Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sjmarf
cake
to Programmer [email protected]English • 1 month ago

Oh no! 🤦‍♂️

sh.itjust.works

message-square
55
fedilink
728

Oh no! 🤦‍♂️

sh.itjust.works

Sjmarf
cake
to Programmer [email protected]English • 1 month ago
message-square
55
fedilink
  • @[email protected]
    link
    fedilink
    English
    0•1 month ago
    rm -frv "$PWD/~"
    rm -frv '~'
    rm -frv \~
    find /path -type d -name '~' -exec rm -rfv \;
    
    • @[email protected]
      link
      fedilink
      8•1 month ago

      In these touchy cases always add ‘-i’ to have a confirmation when doing dangerous things. This will save your ass.

    • @[email protected]
      link
      fedilink
      26•1 month ago

      I don’t understand the eagerness of most people to go nuclear by adding potentially dangerous arguments when not required.

      Use rmdir to remove a directory you expect to be empty, not rm -rf

      • @[email protected]
        link
        fedilink
        1•1 month ago

        It’s because they know how to use rm -rf, and they don’t know how to use rmdir. Honestly, I can’t think of a single time I’ve ever successfully removed a directory with rmdir. I always wind up using something else.

    • @[email protected]
      link
      fedilink
      1•1 month ago

      why -exec rm when find has a -delete flag?

      • @[email protected]
        link
        fedilink
        3•1 month ago

        Is that some new-fangled GNU thing? It’s certainly not POSIX.

        • @[email protected]
          link
          fedilink
          5•1 month ago

          Oh, for once the BSD version has more options than the GNU one.

Programmer [email protected]

[email protected]
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
  • 39 users / day
  • 290 users / week
  • 1.1K users / month
  • 4.42K users / 6 months
  • 3 subscribers
  • 1.58K Posts
  • 55.9K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org