Reputation
798
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 27
Impact
~42k people reached

Feb
1
comment How can I get my external IP address in bash?
Got it working with some decent lot of regex magic, but it wasn't easy. Should you insist on using this service, be sure to wrap that line into a script: $ curl -s http://whatismyip.org | grep -o '\([[:digit:]]\{1,3\}\.\)\{3\}[[:digit:]]\{1,3\}'
Feb
1
comment How can I get my external IP address in bash?
+1 Albeit looking so clumsy, this approach has been a life-saver for me too a few times. Because Internet is not WWW. You can have internet access, but you may (commonly in server rooms) be doomed to a non-GUI console, and in this case it's important to remember by heart one of the checkIP service URLs. And as this one is pretty common, it's only seemingly compilcated, as you will be more likely to remember the DynDNS one than the one of amazonaws. That is, if you have NO way to google for it. (not even lynx).
Jan
31
comment Redirecting stdout to a file you don't have write permission on
Well I would be pretty satisfied with 4 :-D Your English is not bad at all. It's just worded in a kind of terse techie nerdspeak. I must guess you're a coder. Coders amongst each other will understand themselves perfectly that way, but a non-coder must think it's worded like...as said.
Jan
29
comment SmartMonTools: How can I know if there is any smartctl test running on my hard disk?
@frostschutz "smartctl -H is a false friend in that regard." You can say that again! I too have fallen for this option once, thinking it might have to do with the self-tests...but no, entirely different subject (and purpose).
Jan
29
comment Redirecting stdout to a file you don't have write permission on
@umeboshi But reliable only if you're experienced enough to know exactly what you're doing. Fordd can be fairly dangerous (if not to say: devastating) if only a slight mistake was made. So for new users, I'd rather recommend the tee method to be on the safe shore.
Jan
29
comment Redirecting stdout to a file you don't have write permission on
This is worded like an Ancient Chinese riddle. Can't see to understand how this got so many upvotes. (hrmph)
Jan
29
comment Emptying a file for root user does not work
Thanks so much! I had one single mistake in my line, and I think I should quote it here so that people are alerted: sudo cp /dev/null > /to/be/truncated/file. I dunno why exactly it spits me out a bash: /to/be/truncated/file: Permission denied but it does. Omit that damn > and it works. D'oh. (Well, in my case, the origins may still date back to my MS-DOS times, where I would frequently use C> type (...) plus the redirection operator >.)
Jan
16
comment How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
You can check for security lock (Linux only) as follows: sudo hdparm -I /dev/sdX(X = a .. z, you have to known the device name of your drive, of course). Look at the last 10 lines of the output. You MUST be able to read NOT locked in one line. The "not" is important! Should it be missing, your drive is locked!!
Jan
16
answered How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
Jan
16
comment How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
@Rmano Are you kidding me? The system would never ask for a password! Nor would Linux ... ever. It would just behave as if the drive was badly broken (flooding screen with timing errors etc.). I am not talking about an encrypted drive. If you security-lock a hard drive by password (e. g. with hdparm under Linux), it will most likely not operate on Windows at all (probably not even be detected). Until it gets unlocked again (temporarily (UNLOCK) or permanently (DISPWD))
Jan
16
comment How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
@Rmano Joining late to the party, but OK...what you've reported ("error on each an every I/O operation") can even happen with a 100% perfect drive, when ... security locked! Once experienced with hdparm, which, after finishing its --security-erase, does not reliably remove the security lock from the drive after doing its work (unless by a cold reboot). However, after issuing a DISPWD on that drive (system rescue CD), it behaved just greatly and there were no errors. So beware of those drives locked by security password!! At least make sure your SSD drive doesn't have LOCK enabled.
Jan
16
comment How to tell Linux Kernel > 3.0 to completely ignore a failing disk?
Another big thanks goes to the Linux kernel team for speedily including a patch into a stable kernel release, probably helping 10,000 people that way with similar problems.
Dec
30
awarded  Popular Question
Dec
21
awarded  Revival
Dec
18
awarded  Popular Question
Dec
17
revised E: sub-process /usr/bin/dpkg returned an error code (1) while updating php
added 76 characters in body
Dec
17
revised E: sub-process /usr/bin/dpkg returned an error code (1) while updating php
added 15 characters in body
Dec
17
answered E: sub-process /usr/bin/dpkg returned an error code (1) while updating php
Dec
16
comment What is the purpose of the lost+found folder in Linux and Unix?
@JohanE You're telling me. However, the actual reason why I posted my comment was because this answer was trying to suggest us to "be thankful" for lost+found. This felt way too hilarious to be true (I sat here with a broad grin), for the ridiculously few times when we're thankful for it can't compete with those when we'd rather be able to cast a "Begone!" spell to this nuisant lo+fo thing.
Nov
25
comment How to count the number of a specific character in each line?
@AmelioVazquez-Reina It cannot work, by design. Translated into human-readable prose, s/[^,,]//g means: find everything that is not a comma and remove it. Note that this is a [^character]construction, which excludes the character following the caret ^. This should explain why your multiple commas are ignored and interpreted as one single one.