lemmy.billiam.net
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
fool@programming.dev to Programmer Humor@programming.dev · 8 months ago

of=/dev/sda

programming.dev

message-square
68
link
fedilink
556

of=/dev/sda

programming.dev

fool@programming.dev to Programmer Humor@programming.dev · 8 months ago
message-square
68
link
fedilink
alert-triangle
You must log in or register to comment.
  • Scoopta@programming.dev
    link
    fedilink
    arrow-up
    29
    ·
    8 months ago

    I am immune to /dev/sda for I only have nvme

    • quant@leminal.space
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      An unintended benefit of using Qubes is that everything is a virtual machine and physical disks have to be manually attached to a vm before doing operations like dd. I haven’t had to worry about accidentally nuking my main partition for a while.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        Huh, yeah I suppose that’s true. Qubes is an interesting project but I’m not sure it’s for me. I selectively isolate apps I worry about using containers, I actually should give flatpak a try as it basically does that for me but I haven’t seriously tried it yet.

    • nxn@lemmy.ml
      link
      fedilink
      English
      arrow-up
      12
      ·
      8 months ago

      What do you mean? The nvme device label convention is far easier to screw up IMO. At least on my system the first drive would be labeled “nvme0n1”, second “nvme1n1”, etc and partitions get an additional suffix like “nvme0n1p1”.

      I am far more likely to screw that up compared to “sda” vs “sdb”. Especially since I noticed that if I have both my internal and external SSDs hooked up at boot time their number gets assigned on a seemingly random basis.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        8 months ago

        Eh? Idk if I agree. My original comment was entirely a joke based on the fact that the literal argument of=/dev/sda has no affect on my system but to address your actual point. I personally don’t find nvme naming any more confusing than SCSI. /dev/nvme0n1 is only one char away from /dev/nvme1n1 just like sda vs sdb. Additionally if you understand how the kernel comes up with those names they make a lot of sense. The first number is the controller, the second is the namespace or drive attached to that controller, the 3rd if present is the partition on the given drive. It is entirely possible to have a controller with more than one namespace. That aside aside…I think there is a genuine benefit to be argued for having USB drives, which are SCSI and fall into sdX naming separate from system drives as I dd far more USB media than system media. Making it a lot harder to screw my system up when trying to poke a flash drive.

    • Trainguyrom@reddthat.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      8 months ago

      I realized I was long overdue for a hardware refresh when I learned that nvme drives are /dev/nvme and not /dev/sd[x] and I realized every single computer I interacted with was pre-nvme

    • redditReallySucks@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      30
      ·
      8 months ago

      I love the nvme partition naming. Looking at you nvme1n1p3

      • ilikecoffee@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        8 months ago

        /dev/nvme1s²2s²2p⁶3s²3p⁶4s²3d¹⁰4p²

    • cmhe@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      8 months ago

      That might make it even more dangerous, because you get used to flash to usb sticks on “/dev/sda”. And when you then use a device with a built-in sata drive, you might forget checking in a hurry.

      Happened to me a once or twice. I am now only using bmap tools for this.

  • 0x0@programming.dev
    link
    fedilink
    arrow-up
    10
    ·
    8 months ago

    Empty $PATH.

  • bacon_pdp@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    8 months ago

    bah, https://github.com/fosslinux/live-bootstrap

    you don’t even need a terminal or a prompt to bootstrap every tool you need.

  • vvv@programming.dev
    link
    fedilink
    arrow-up
    79
    ·
    8 months ago

    … but cd is a built-in

    • fool@programming.devOP
      link
      fedilink
      arrow-up
      42
      ·
      8 months ago

      -1 accuracy point ( ◞ ﹏ ◟)

      linux 4.5-rc5 had efivarfs fixed to prevent “rm -rf /” bricking uefi motherboards – so maybe someone can try it out? :]

      • HighlyRegardedArtist@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        8 months ago

        This is one of the reasons I’ve disabled uefi by default with the noefi kernel parameter, the other reason being the LogoFAIL exploit: https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#Disable_UEFI_variable_access

    • sik0fewl@lemmy.ca
      link
      fedilink
      arrow-up
      9
      ·
      8 months ago

      It would be pretty useless if cd was a child process that changed its own directory, only to return to bash and be back where you started.

  • mycodesucks@lemmy.world
    link
    fedilink
    arrow-up
    160
    ·
    8 months ago

    Obligatory XKCD

    • subtext@lemmy.world
      link
      fedilink
      arrow-up
      35
      ·
      8 months ago

      https://explainxkcd.com/1084

    • Gsus4@mander.xyz
      link
      fedilink
      arrow-up
      8
      ·
      8 months ago

      need to be more creative with aliasing than “ls”

  • nxn@lemmy.ml
    link
    fedilink
    English
    arrow-up
    32
    ·
    8 months ago

    “gg” - dd

  • Shadow@lemmy.ca
    link
    fedilink
    arrow-up
    37
    ·
    8 months ago

    No problem, just tab complete your way around the filesystem.

    • Ziglin (it/they)@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      8 months ago

      What filesystem?

  • Aniki 🌱🌿@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    8 months ago

    This isn’t programming, just someone who sucks at bash.

    • zero_spelled_with_an_ecks@programming.dev
      link
      fedilink
      arrow-up
      9
      ·
      8 months ago

      How else are you going to open your files in nano to do the programming on the prod server?

      • Aniki 🌱🌿@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        8 months ago

        what’s a nano?

        • DarkenLM@kbin.earth
          link
          fedilink
          arrow-up
          3
          ·
          8 months ago

          A metric prefix that represents 10e-9 of a unit.

        • Appoxo@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          The beginner (and better) version of vim?

  • mariusafa@lemmy.sdf.org
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    8 months ago

    guix rollback

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    59
    ·
    8 months ago

    Hmmm command not found, let me just try the same command a couple more times, this time it will work right?

    In IT teaching users to actually read and understand errors is always an uphill battle.

    • smeg@feddit.uk
      link
      fedilink
      English
      arrow-up
      7
      ·
      8 months ago

      Never dealt with an intermittent failure or race condition, eh?

    • FruitLips@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      Where is the Windows ‘help’ button, did you try that?

    • kaboom36@ani.social
      link
      fedilink
      arrow-up
      80
      ·
      8 months ago

      Tbh I’d try it multiple times too, just because the concept of cd not being there is horrifying and cannot possibly be the case

      • Ziglin (it/they)@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        Also muscle memory. I keep typing aliases I only have on my computer :(

      • Thorry84@feddit.nl
        link
        fedilink
        arrow-up
        26
        ·
        8 months ago

        Very true, I would do the same and feel my stomach drop farther each time.

    • skulbuny@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      24
      ·
      8 months ago

      I learned early in my software engineering career these two beautiful rules of debugging:

      1. Read all of the words
      2. Believe them
      • ugo@feddit.it
        link
        fedilink
        arrow-up
        7
        ·
        8 months ago

        Until you write a compiler error in some deeply templated C++ code, in which case just reading every word takes all day

        /s but not too much

      • Elvith Ma'for@feddit.org
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        8 months ago

        Unless you were the one writing the program and its error messages - then check, that you didn’t mess up there…

      • smeg@feddit.uk
        link
        fedilink
        English
        arrow-up
        6
        ·
        8 months ago

        Addendum to 2: never believe that what they say is relevant to what’s actually happening here. You have a lot of faith that the people writing error messages knew what they were doing!

        • Trainguyrom@reddthat.com
          link
          fedilink
          English
          arrow-up
          3
          ·
          8 months ago

          Having written some error messages in a godforsaken database frontend, an error message only means that something didn’t work correctly and may or may not correctly indicate what is actually wrong

        • skulbuny@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          8 months ago

          I mean, if the error says “variable foo is not defined” I don’t think it’s wise to go “I’m pretty sure it’s defined, the compiler is just wrong” 😂

          • Ethan@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            8 months ago

            I don’t know, have you ever used JavaScript? I’ve run into some really fucking weird bugs. I’ve also spent hours trying to find the source of an error message only to discover the error message was lying and caused by some other error.

    • Lepsea@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      ·
      8 months ago

      You see they all different one use / the other use - and ~

      /S

      • thevoidzero@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        8 months ago

        Yeah but those are arguments to cd, the error says command not found

        Edit: Sorry didn’t see /S

  • Nicht BurningTurtle@feddit.org
    link
    fedilink
    arrow-up
    16
    ·
    8 months ago

    I see girls last tour, I upvote.

  • bitwolf@lemmy.one
    link
    fedilink
    arrow-up
    6
    ·
    8 months ago

    I remember being so scared the first time I screwed up my $PATH

  • antonamo@feddit.org
    link
    fedilink
    Deutsch
    arrow-up
    6
    ·
    8 months ago

    sudo dd if=. /rpi3-aarch64-archlinux.img status=progress of=/dev/sd[tab] [tab] [enter]

  • pfm@scribe.disroot.org
    link
    fedilink
    arrow-up
    76
    ·
    8 months ago

    Reminds me this great story from a different era:

    https://www.ee.ryerson.ca/~elf/hack/recovery.html

    • pro3757@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      I got reminded of it last week after years. What are the chances it came up again. 😁

    • Brahvim Bhaktvatsal@lemmy.kde.social
      link
      fedilink
      isiZulu
      arrow-up
      8
      ·
      8 months ago

      THANKS!!! I have it bookmarked forever now!

      I lost access to it. Thank you for bringing it back to me! Yay!..

    • fibojoly@sh.itjust.works
      link
      fedilink
      arrow-up
      22
      ·
      8 months ago

      That was a beautiful read, cheers!

      • pfm@scribe.disroot.org
        link
        fedilink
        arrow-up
        16
        ·
        8 months ago

        If you enjoyed it, I’ve collected a couple of others:

        https://untalkative.one/reading:2019:good-stories

        • Trainguyrom@reddthat.com
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 months ago

          The final line of the one about the VAX machine is so perfect

  • teft@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    8 months ago

    You should all just use an immutable distro. Problemo solved-o.

    /s

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

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
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.91K users / day
  • 4.55K users / week
  • 8.23K users / month
  • 17.8K users / 6 months
  • 2 local subscribers
  • 23.4K subscribers
  • 1.42K Posts
  • 52.3K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org