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).
just add a '|| true' at the end of every call to grep!
Suicide Linux
101–110 of 135 posts
Re: Suicide Linux
#102On 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".
If either of the files dot or dot-dot are specified as the basename portion of an operand (that is, the final pathname component) or if an operand resolves to the root directory, rm shall write a diagnostic message to standard error and do nothing more with such operands.
Source: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm...
Re: Suicide Linux
#103> 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…
That was possibly the best unix/linux learning experience of my life. Rebuilding /etc sufficient to rescue my files I cared about before a reinstall. Rescue CDs weren't really a thing, USB was a new thing at the time, and I was on dial-up.
Re: Suicide Linux
#104> 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…
Within the first year or so of having installed Linux (mid-90's), I made the mistake of accidentally deleting /etc (wrote a script to tidy /tmp at boot, but it hadn't cd'd correctly). That was possibly the best unix/linux learning experience of my life. Rebuilding /etc sufficient to rescue my files I cared about before a reinstall. Rescue CDs weren't really a thing, USB was a new thing at the time, and I was on dial-…
Re: Suicide Linux
#105Earlier quoted context omitted.
I never type sl, but often type "gerp". I have an alias though.
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`...
[alias]
co = checkout
psuh = push
s = status
l = log
d = diff
And then alias g=git in your shell configuration. "g s", "g l", etc. But nowadays I just use magit.Re: Suicide Linux
#106> 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…
Another fun one: "killall" on Linux kills processes with names matching a string. "killall" on Solaris reboots the machine ...
Re: Suicide Linux
#107Earlier quoted context omitted.
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. :)
I like this joke, it kind of reminds me of the difference between `find_by_id` and `find` in ruby on rails. In the former, if a result can't be found it will return `nil` but in the latter it expects the record to exist and so will raise an exception if it can't be found.
Re: Suicide Linux
#108> 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…
As luck would have it, I had the output of fdisk -l /dev/sda in my terminal scrollback buffer and was able to recreate the partition table with no damage done.