Live data from Hacker News

Suicide Linux

qntm.org

81–90 of 135 posts

Re: Suicide Linux

#81
post #26

Earlier quoted context omitted.

There's the cdspell shopt: "If set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors checked for are transposed characters, a missing character, and a character too many. If a correction is found, the corrected path is printed, and the command proceeds." ( https://www.gnu.org/software/bash/manual/html_node/The-Shopt... )

It's an interesting idea, but is made mostly irrelevant by tab completion.

I knew a guy who aliased all permutations of 'make' (maek, mkae, amke...) to 'make', so he just hammer the keys at once and be sure the thing would run.

Re: Suicide Linux

#82
In the video, the banner the shell displays says:

  =========================================================
  WARNING: Suicide Linx installed
           (http://sourceforge.net/projects/suicide-linux/)
  =========================================================
I'm wondering if the typo is a subtle joke.

Re: Suicide Linux

#83

Earlier quoted context omitted.

It's an interesting idea, but is made mostly irrelevant by tab completion.

I knew a guy who aliased all permutations of 'make' (maek, mkae, amke...) to 'make', so he just hammer the keys at once and be sure the thing would run.

I've had to do this with grep, gerp gpre gper. I've determined that I'm just constitutionally incapable of typing that word more than 2 in 3 times, and I've learned to cope with my disability.

Re: Suicide Linux

#84
post #38

Earlier quoted context omitted.

A friend of mine aliased `git status` `git statsu`; I, being lazier, chose `git st`. Any time saved I lost by not copying his other alias, `c = commit -amSTUFF`...

I must be lazier. I use `gitst` for `git status`. That is 1/6 shorter and IMO not harder to remember.

`gits`

also

`gitv` = git diff

`gitvc` = git diff --cached

Re: Suicide Linux

#85
post #40

Earlier quoted context omitted.

Man, I hope you don't use grep very often (by default it uses exit code 1 when it doesn't find anything).

If it didn't exist in the first place, then you had no business searching for it. You should have just known not to look. :)

Negative result is still a result. I sometimes use `grep -r` to check whether "does this set of files contain this particular string?" and "no" is a useful answer :)

Re: Suicide Linux

#86
post #80
post #30

> The reaction from the OS is actually rather underwhelming. Somehow related, a coworker at a previous place unmounted some disks on an old AIX production box. It took him a solid minute to realise he had mistakenly unmounted / due to a typo (yes it was possible) as old processes with already opened files were happily serving stuff and only new attempts at opening files were beginning to produce errors. Also, a simil…

A few months back I was wiping some old drives using a USB->SATA adapter plugged into an old Linux machine I keep around for experimenting on random things. Mostly because I could just leave it to run for however long it took. There were two drives in the machine, sda and sdb. So the drive came up as sdc. So then I typed: $ shred -n1 -v /dev/sda Took me about 4 seconds to realize what I did before hitting Ctrl-C. The…

Stuff like this is why I usually double check and only access disk by anything but the /dev/sdx or /dev/hdx labels; too easy to blow up in your face.

Re: Suicide Linux

#87

On Illumos rm -rf / does nothing. POSIX says that removing / has undefined behavior, so the obviously smart (useful, user-friendly, GOOD) thing to do is to do nothing, as that fits "undefined behavior".

rm -rf /* ?

I believe the spec says arguments can be deleted in any order, so it always chooses "current directory” first, which fails, failing the whole command

Re: Suicide Linux

#88
post #38

Earlier quoted context omitted.

A friend of mine aliased `git status` `git statsu`; I, being lazier, chose `git st`. Any time saved I lost by not copying his other alias, `c = commit -amSTUFF`...

I must be lazier. I use `gitst` for `git status`. That is 1/6 shorter and IMO not harder to remember.

See also SCM Breeze [0], which shortens git commands even more:

    git status -> gs
    git add -> ga
    git commit -> gc
    ...
[0]: https://github.com/scmbreeze/scm_breeze

Re: Suicide Linux

#89
post #30

> The reaction from the OS is actually rather underwhelming. Somehow related, a coworker at a previous place unmounted some disks on an old AIX production box. It took him a solid minute to realise he had mistakenly unmounted / due to a typo (yes it was possible) as old processes with already opened files were happily serving stuff and only new attempts at opening files were beginning to produce errors. Also, a simil…

Waay back in the day I was using crusty old shared Sun3 workstations. The keyboard was really sticky because, well, some students are pigs. I developed the habit of SLAMMING the Enter key on each command, until one day I was deleting backup files (rm *~) and my fingers grazed the delete button before striking Enter...
Post reply on HN