Boost::Fuck! (the git command)



  • ➜  apt-get install vim
    E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    
    ➜ fuck
    sudo apt-get install vim
    [sudo] password for nvbn:
    Reading package lists... Done
    ...
    
    ➜ git push
    fatal: The current branch master has no upstream branch.
    To push the current branch and set the remote as upstream, use
    
        git push --set-upstream origin master
    
    
    ➜ fuck
    git push --set-upstream origin master
    Counting objects: 9, done.
    ...
    
    ➜ puthon
    No command 'puthon' found, did you mean:
     Command 'python' from package 'python-minimal' (main)
     Command 'python' from package 'python3' (main)
    zsh: command not found: puthon
    
    ➜ fuck
    python
    Python 3.4.2 (default, Oct  8 2014, 13:08:17)
    ...
    
    ➜ git brnch
    git: 'brnch' is not a git command. See 'git --help'.
    
    Did you mean this?
        branch
    
    ➜ fuck
    git branch
    * master
    

    Nice!


  • sockdevs

    That should be a standard-install package for every Linux distro.

    And every other OS for that matter :smile:



  • ➜ git brnch
    git: 'brnch' is not a git command. See 'git --help'.

    Did you mean this?
        branch
    
    ➜ fuk
    No command 'fuk' found, did you mean 'fuck'
    
    ➜ Ctrl+D
    

    OT: Since when is ➜ an indicator of what has been $ for the last 30 years?



  • @Eldelshell said:

    OT: Since when is ➜ an indicator of what has been $ for the last 30 years?

    Get with the times man. Technology is moving forward.



  • @Eldelshell said:

    ➜ git brnch
    git: 'brnch' is not a git command. See 'git --help'.

    Did you mean this?
        branch</blockquote>
    

    No you dumbass, I said "get brunch".


  • Winner of the 2016 Presidential Election

    @cartman82 said:

    Technology is moving forwardto the right.

    Filed Under: FTFY



  • So if you delete files, it can undo that?

    No?

    It only helps with syntax errors?

    Fuck.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    So if you delete files, it can undo that?

    The GUI recovery tools also don't help if you use DEL from the command line in Windows. That a computer might actually do what you tell it to is somehow mysterious to you is ironic.



  • @Eldelshell said:

    OT: Since when is ➜ an indicator of what has been $ for the last 30 years?

    Since the invention of custom prompts and Unicode.

    @blakeyrat said:

    So if you delete files, it can undo that?

    No?

    It only helps with syntax errors?

    Fuck.


    If you're that stupid incapable annoyed by it, you can replace the rm program with something that moves files in some directory instead of deleting them.



  • @dkf said:

    That a computer might actually do what you tell it to is somehow mysterious to you is ironic.

    Do you honestly think these two things are mutually-exclusive:

    1. A computer should do what I tell it to do
    1. I should be able to tell a computer to undo the last thing I did

    Show your work.

    I just don't know how your people's brains work. I'm here saying, "I want to be able to undo a command," and you reply with "COMPUTERS SHOULD DO WHAT YOU TELL THEM TO DO DUH DERP HERP DERP DUH!" Well duh. But how does your response relate to my post? At all? The two things are entirely orthogonal. Do you even spend a third of a second thinking about these posts before you make them?



  • @blakeyrat said:

    Do you honestly think these two things are mutually-exclusive:

    1. A computer should do what I tell it to do
    2. I should be able to tell a computer to undo the last thing I did

    Show your work.


    You and @dkf seem to have different understanding of what deleting means. You think of deleting as "I don't see it anymore", and @dkf is more like "this thing ceases to exist".


  • Discourse touched me in a no-no place

    If I just didn't want to see the thing any more, I'd close my eyes. Or the window. Whatever.



  • @Gaska said:

    You and @dkf seem to have different understanding of what deleting means. You think of deleting as "I don't see it anymore", and @dkf is more like "this thing ceases to exist".

    It doesn't matter WHAT the operation is, I just want to be able to undo it. Always. At all times. Why shouldn't I be able to?

    If Linux assholes pulled their heads out of their asses for a few minutes and stopped giving a shit about being so 1337, they might realize: "hey wait, that's a really good idea."



  • @blakeyrat said:

    I just don't know how your people's brains work. I'm here saying, "I want to be able to undo a command," and you reply with "COMPUTERS SHOULD DO WHAT YOU TELL THEM TO DO DUH DERP HERP DERP DUH!" Well duh. But how does your response relate to my post? At all? The two things are entirely orthogonal. Do you even spend a third of a second thinking about these posts before you make them?

    "DUH DERP HERP DERP DUH" :rofl:

    That out of the way: "Computers should do what you tell them" is not the same thing as "Computers should UNDO what I told them to do." I had this friend that used to say, "First word goes to God, second word goes to the dogs." If your first word is "delete x forever", why would you expect that your second word, "undo my delete x forever" should do anything useful?

    Yes, people make mistakes, and the software industry has worked hard to make as many things undo-able as possible. But there will always be things that can't be undone...just like you can't un-pull the trigger on a gun. So be careful what you ask the computer to do: you might get it, forever.



  • @CoyneTheDup said:

    Yes, people make mistakes, and the software industry has worked hard to make as many things undo-able as possible.

    NOT IN THE OPEN SOURCE WORLD that is exactly my complaint.

    @CoyneTheDup said:

    But there will always be things that can't be undone...just like you can't un-pull the trigger on a gun.

    Right; but there shouldn't be.

    NOW WE GET INTO THE PART OF THE THREAD WHERE IT BECOMES APPARENT YOU DUMBFUCK MORONS DON'T KNOW WHAT THE WORD "SHOULD" MEANS!

    Try this: "there will always be traffic accidents." WELL DUH! Does that mean we should stop trying to prevent traffic accidents? No, that line of thinking is insane and retarded. SO WHY IS IT TO COMMON IN THE COMPUTER WORLD!?


  • area_deu

    BUT YOU CAN ALSO PERMA-DELETE IN CLOSED-SOURCE WINDOWS.
    You dumbfuck.

    And all widely-used GUI file managers in Linux have the delete button set to move things to trash. Not perma delete. Just like in the proper closed-source software.

    Seriously, you always use the same stupid invalid arguments to annoy everyone every time the word CLI or shell gets mentioned. It's getting fucking old. Really. Really fucking old.



  • @aliceif said:

    BUT YOU CAN ALSO PERMA-DELETE IN CLOSED-SOURCE WINDOWS.

    And I criticize that behavior, too. I've done so dozens of times on this forum.

    ... are you trying to paint me as a hypocrite, or what is this?

    @aliceif said:

    And all widely-used GUI file managers in Linux have the delete button set to move things to trash. Not perma delete. Just like in the proper closed-source software.

    Ok; now why don't any of the CLIs have an undo command?

    @aliceif said:

    Seriously, you always use the same stupid invalid arguments to annoy everyone every time the word CLI or shell gets mentioned. It's getting fucking old. Really. Really fucking old.

    Then maybe do some free open source-y labor and FIX THE FUCKING PROBLEM!

    As long as something's shit, I'm going to call it shit.


  • area_deu

    @blakeyrat said:

    As long as something's shit, I'm going to call it shit.

    Then fucking keep the constant fucking bitching about one and the same fucking stupid aspect of one fucking thing in one fucking thread that we can all fucking mute.

    Fucking hell.

    Hell, I'd pin it for you!
    [The official "DELETE NEEDS TO ALWAYS BE UNDOABLE" thread by @blakeyrat], coming to the top of your topic listing soon™



  • @blakeyrat said:

    It doesn't matter WHAT the operation is, I just want to be able to undo it. Always. At all times. Why shouldn't I be able to?

    How do you imagine undoing disk format? How do you imagine undoing sending data to the internet? How do you imagine undoing attack in multiplayer game?



  • @blakeyrat said:

    It doesn't matter WHAT the operation is, I just want to be able to undo it. Always. At all times. Why shouldn't I be able to?

    SDelete?



  • @blakeyrat said:

    If Linux assholes pulled their heads out of their asses for a few minutes and stopped giving a shit about being so 1337, they might realize: "hey wait, that's a really good idea."

    Linux assholes are actually the only folks who have created a filesystem where it's guaranteed all operations are reversible, including modifying contents and deleting - NILFS.


  • Winner of the 2016 Presidential Election

    @aliceif said:

    And all widely-used GUI file managers in Linux have the delete button set to move things to trash. Not perma delete

    @blakeyrat said:

    Ok; now why don't any of the CLIs have an undo command?

    So, the way I read this, if you don't delete stuff but move it to the trash, you can revert it (somewhat if you remember where the stuff was before).

    The question is: can you - in Linux - overwrite the rm-command to just move the files / folders to the trash (unless you wanna remove from trash in which case it perma deletes)?
    It seems like something that should be doable, seeing as rm is just a binary that gets called, right?
    Feels like a one liner to me.

    I know this still doesn't make it easily recoverable. You'd probably have to extend your script to keep a database / file with the original locations that also gets purged once the bin is emptied. But this still seems managable....

    And yes, still no "undo" per se. I am just curious about this!

    Filed Under: Question to the Linux gurus here


  • area_deu

    We had a thread about that in some topic ...

    I think that was 1 to 3 weeks ago


  • sockdevs

    @Kuro said:

    The question is: can you - in Linux - overwrite the rm-command to just move the files / folders to the trash (unless you wanna remove from trash in which case it perma deletes)?It seems like something that should be doable, seeing as rm is just a binary that gets called, right?Feels like a one liner to me.

    saferm() {
        mv $1 ~/.trash
    }
    alias rm=saferm
    

    in your .bashrc maybe? Not got a system to test this on; all my machines run Windows, except my Nexus 7, which is Android.



  • Not a complete solution: There is no matching undelete command to undo it. There is no record of where it came from, which undelete would need. If you delete more than one file of the same name, the earlier one is overwritten, making it unrecoverable.

    However, as far as it goes, that would work.



  • @aliceif said:

    [The official "DELETEABSOLUTELY EVERYTHING NEEDS TO ALWAYS BE UNDOABLE" thread by @blakeyrat], coming to the top of your topic listing soon™

    FTFY



  • You also forgot that it could potentially migrate files between volumes (say, for example, if ~ was really smb://your-domain-controller.local/$raceprouk), adopts the resulting file into your disk quota, doesn't do pruning in case disk space or quota becomes overly tight, and isn't discoverable (as it's hidden by default and has no desktop item unless you remember to set one up). And depending on how intelligent mv is, you may lose other information like alternate data streams or SELinux ACLs.


  • Discourse touched me in a no-no place

    @cartman82 said:

    Get with the times man. Technology is moving forward.

    What's the VT100 escape code to display a right arrow instead of a $?



  • Is there an unfuck as well?



  • @blakeyrat said:

    1) A computer should do what I tell it to do

    1. I should be able to tell a computer to undo the last thing I did

    • Print 100 copies of Mein Kampf

    • WAIT UNDO UNDO FUCK FUCK WHAT HAVE I DONE

    paging @godwin



  • SHELLS WERE PUT ON THIS PLANET TO RUN ARBITRARY CODE. HOW DO YOU NOT UNDERSTAND THAT <!-- a -->



  • $ alias rm=trash # or trash-put
    
    $ cat > delete-me
    Garbage^D
    $ ls
    delete-me
    $ rm delete-me
    $ ls
    $ trash-list
    2015-04-15 15:20:17 /home/kane/Documents/taxes/
    2015-04-19 00:00:01 /home/kane/tmp/delete-me
    $ trash-restore
    0 2015-04-15 15:20:17 /home/kane/Documents/taxes/
    1 2015-04-19 00:00:01 /home/kane/tmp/delete-me
    What file to restore [0..4]: 1
    $ ls
    delete-me
    
    

  • Discourse touched me in a no-no place

    @FrostCat said:

    What's the VT100 escape code to display a right arrow instead of a $?

    What character set is installed in that terminal?



  • @blakeyrat said:

    NOT IN THE OPEN SOURCE WORLD that is exactly my complaint.

    You do know that programs like rm weren't open source when they were made, right? The GNU rm you find in Linux is different than the one found on 70' Unix or in today's Solaris, HPUX, AIX, etc. So, stop confusing UNIX with OSS.



  • @Kuro said:

    The question is: can you - in Linux - overwrite the rm-command to just move

    Again, rm is not a command, is a program, independent of the shell. This means that it can be removed and aliased to something else, like mv.



  • @Gaska said:

    Linux assholes are actually the only folks who have created a filesystem where it's guaranteed all operations are reversible, including modifying contents and deleting - NILFS.

    Also the only filesystem that sounds like a porn category.



  • @riking said:

    ```
    $ trash-restore
    0 2015-04-15 15:20:17 /home/kane/Documents/taxes/
    1 2015-04-19 00:00:01 /home/kane/tmp/delete-me
    What file to restore [0..4]:

    
    What happens if you type 2, 3 or 4?


  • @dkf said:

    What character set is installed in that terminal?

    ASCII is a safe bet.



  • Whatever standard trash bin ubuntu uses isn't exposed anywhere. Last Friday I found out the cause of my desktop slowness and disk-nearly-full status: A 20GB trash can, and a 4GB desktop search index (mostly indexing customer system analysis data which really shouldn't be indexed in the first place). Neither of them likely playing well with the virus scanner (TR :wtf:, for a linux system)

    Trash emptied, and the indexer reeducated that I don't want the downloads folder indexed, system should be running much smoother from now on.


  • sockdevs

    IIRC you want ~/.Trash for your trash folder. was it not something like that for you?


  • :belt_onion:

    @PleegWat said:

    Whatever standard trash bin ubuntu uses isn't exposed anywhere.

    Navigating to trash:/// (in Nautilus) should always lead to your personal trash directory.

    It's ~/.local/share/Trash on my system (Debian, though I'm not sure if it's determined by distro or DE, never checked).



  • I think ~/.local/share/Trash was the one for me, so it didn't jump out in a scan of my home directory. And there's nothing shouting out "Hey, doofus, 20GB of your 100GB HD is taken up by trash!", where in windows:

    • The trash can is always (or at least by default) visible on the desktop
    • The trash can icon progressively indicates how much is in it
    • The trash never uses more than 10% (configurable) of your hard drive

  • :belt_onion:

    @PleegWat said:

    The trash can is always (or at least by default) visible on the desktop

    Always been there for me by default.

    Your other points are completely valid. No idea if it's configurable since I very rarely even use trash. I usually never delete stuff unless I'm really, really sure I don't need it and I know it's backed up anyway, so it's ShiftDelete for me 99% of the time.


  • sockdevs

    @Onyx said:

    I usually never delete stuff unless I'm really, really sure I don't need it and I know it's backed up anyway,

    for me i "delete" things by moving them to my RAID NAS that's also backed up. that way i can almost infinitely undelete (if i can find it again, which is iffy at best thanks to less than stellar organization of the deleted items section) and i'll deal with permanently deleting things when it gets full (which will be a while...)



  • @Kuro said:

    I know this still doesn't make it easily recoverable. You'd probably have to extend your script to keep a database / file with the original locations that also gets purged once the bin is emptied. But this still seems managable....

    It's not only manageable, it's installable and interoperable with the GUI trash bin. Blakey won't install it because he'd rather be angry than happy.

    I won't install it because I always reflexively bypass the useless fucking trash bin anyway. If you're backing up your shit, you don't need to have your dick held by the OS; if you're not, you don't deserve it.


  • area_deu

    @Onyx said:

    It's ~/.local/share/Trash on my system (Debian, though I'm not sure if it's determined by distro or DE, never checked).

    It's determined by file manager (or maybe gnomishness vs kdeishness vs neitherness?), I think.

    Thunar moves things to ~/.local/share/Trash, dolphin to ~/.local/share/trash. Really.



  • @Gaska said:

    How do you imagine undoing disk format?

    That's easy. Format only writes a new root directory entry and allocation table. DOS had an UNFORMAT command in 1991.



  • @aliceif said:

    Thunar moves things to ~/.local/share/Trash, dolphin to ~/.local/share/trash. Really.

    Dolphin is doing it wrong. Spec



  • I do understand that. I do not understand how it relates to anything I'm saying.



  • Now delete two files with the same name. Does it work?

    Now delete a file on a portable drive, move it to another computer, and restore the file. Does it work?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.