• NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    14 hours ago

    Among many other reasons, this is one more why I always prefer to use a GUI than a terminal shell. The default delete operation is just sends files to trash, and that’s easily undoable. I think you can even press Ctrl+Z to do so (can’t check atm).

    I don’t even know how to do that from commandline.

    (one online search later…)

    There’s a package for that but best I can tell there’s no universal way.

    • BanMe@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      10 hours ago

      The fear is real but in 30 years of unix and linux work, i’ve never actually deleted anything I didn’t mean to.

      • offspec@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        6 hours ago

        I once tried to delete the .steam folder off of an hold SSD, but the .steam folder is a symlink :(

      • HereIAm@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        9 hours ago

        The first time I accidentally lost a number of files was when I wrote a script to rename some images from the format ddmmyyyy to yyyy-mm-dd. But I put the parsing and saved the variable only once outside the for loop, so all files ended up overwriting each other. Learnt my lesson to run untested scripts on files without a back up

    • kazaika@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      10 hours ago

      Trash-cli probably does what the xdg desktop spec defines, is my guess, which is probably the same as most gui file managers. However trashing files just means moving them to some other hidden directory instead of deleting. So different implementations could use different locations for example, which may make sense in the desktop they where written for