Command Line Idiocy

5 December 2009 in Uncategorized

This is a follow-up to “Blind Leading the Blind“, as another piece of monumental idiocy has stepped up to the plate.

It would seem Linux users can’t catch a break. Every year, blow-hard journalists will try out a Linux LiveCD, decide it’s actually worthwhile, and declare date +%Y to be the year of Linux on the Desktop, only to run around screaming about how Linux isn’t ready for mainstream users after they manage to screw their system over while fiddling with sudo.

Combine that with the fact that the majority of journalists who do routinely cover Linux do so as an off-shoot of their Windows coverage, and thusly you end up with ignorant writers “informing” the masses. There are precious few good sources of Linux news (cough, lwn.net), yet a truly staggering amount of shoddy journalism.

Today’s target is ideal. It’s at once highly superficial, yet the misinformation communicated is dangerous in the minds of ignorant users. Of course, per usual, the misinformation is spread far and wide due to the collective unintelligence of social media sites.

In the introduction paragraph alone, the article gets several things wrong. The very first sentence being:

“This article is equal parts opinion and fact, as the most powerful commands depends on what one needs them for; someone who is running a network of Linux machines will require different commands than an individual user.”

This is completely true, of course. You see, when administrating multiple systems, GNU Coreutils are thrown out the window, replaced by networked magic.

“For example, you may need to use su instead of sudo or nothing at all, if you’re running as root.”

I’m sure su rm will do you loads of good, assuredly doubling your productivity while you sit there staring at su: user rm does not exist.

“Note: to see a full list of possibilities for commands, type ‘command –help’ in the Terminal.”

Truly, we are living in the future. Everybody uses software with GNU-style long options, and there exist no programs that only feature -h, or, perhaps, eschew help output for a man page.

cmd-ps

With three inaccuracies in the first paragraph alone, things aren’t looking good for this article. Proceeding on to the actual commands, we see that the very first entry is the venerable ps. Aside from some misconceptions and generalizations, this entry’s fine — If only because you can’t actually do any direct damage with a program that only parses the contents of /proc/.

The next? rm, of course. The perennial favourite power tool of the ignorant neophyte, with which they can trivially hack their limbs off. So full of misinformation that it can be barely contained by the PNG format:

cmd-rm

The signal to noise ratio is decidedly in favour of noise, here. It seems to be common for idiots to deem -rf (Which equates to the long options –recursive and –force, respectively.) necessary to the operation of rm. However, this is arm-gnawingly stupid. If you’re carelessly using wildcards and match a directory without arguments, rm will refuse to delete the directory. Those files you carefully made non-writable? They’re gone, too, because –force overrides the default behaviour, which is to warn when attempting to delete read-only files.

That’s not even to mention the fact that rm -rf dir $DIR will obviously delete dir and $DIR, and that ‘dir’ is in no way a part of rm’s syntax. Moving past that, we run into the most monumental bit of stupidity yet: “rm -rf dir / will delete the home directory.” Ah, to be young and stupid. To write articles for a publication whose editor is either non-existent or sufficiently inept to not actually test or even glance at the commands being published. I’d riff on the fact that the terminal image is actually depicting rm - rf dir which would obviously cause rm to attempt to delete -, rf, and dir, but frankly I think the author has already illustrated her own stupidity sufficiently at this point.

cmd-pstree

Moving on to #3, pstree. While it produces pretty output, ps can do everything it can do with or without a tree view. Combine that with the fact that ps produces better output for grepping, and you’ll find that not many serious users have a use for pstree.

cmd-history

#4, history, conveniently omits the fact that shell histories are written asynchronously, and thusly, an open terminal won’t have written its activities to disk until it’s closed. Most comically, the author illustrates gross ineptitude with the terminal, piping output to “adobe” and leaving trailing pipes, then failing to compile an application before giving up and installing a binary through the package manager.

cmd-apropos

As for #5, apropos, there’s only a hint of misinformation. See, apropos is not magical, but, alas, technology does appear magical to the wholly ignorant. Being equivalent to man -k, there’s really no need for apropos — Why use a second application to essentially grep through the NAME field of man pages, when that’s one of the basic abilities man already has?

cmd-ls

ls. What lousy list of commands would be complete with the most obvious command of them all, the command necessary to actually display files, directories and their properties? Of course, this paragraph cites invocation as LS and LS -LH. As any user with more than two brain cells knows, by default, Linux (Most *nix, really.) filenames are case-sensitive. So, assuming you can get /bin/ls to actually run, you’re left with the arguments -LH which are entirely disparate to -lh, the former dereferencing symlinks and the latter doing… absolutely nothing.

cmd-grep

I’m surprised to find grep here. It’s something the mouth-breathers tend to forget about, but that does not forgive previous transgressions. Again, idiotic syntax is advocated: Simply because grep can take [aAbBcCdDeEfFgGhHiIjJkK] as an argument doesn’t mean it’s useful, or efficient. Anybody with more than two brain cells will opt for a range, such as [a-z]. Secondly, CamelCasing your input is dumb, and you should just use the -i option, which disables case sensitivity.

cmd-find

Yet another often-omitted tool, if ls is a pair of pruning shears, find is a chainsaw. However, true to past experiences, this article does a very poor job of describing and selling it. As literally every Linux sysadmin should know, /etc/passwd does not contain password information, unless you have managed to deliberately disable shadow passwords, and you do not edit the hashes in /etc/shadow without making use of the passwd utility. Stupid example aside, the author then goes on to mention “commands” that can be used with find, which are, of course, simply compiled-in arguments.

cmd-cron

Unsurprisingly, yet more idiocy. Capitalizing “terminal” as though GNOME Terminal is the only terminal emulator, and, in the second paragraph, giving a time example of 04, 07, 23, 45 * * * *. What will this do? Explode horribly, mostly. See, cron is picky, and you should ideally not violate the format by throwing extraneous spaces in. 04,07,23,45 * * * * would work fine, of course.

Perhaps the most clueless statement is “If you would like a command to run every specific set of minute intervals, add an asterisk after the minute command”, though. Running at minute 5* is equivalent 5,50-59. What actually works would be minute */5. Lastly, the image is quite funny, as if pasting a crontab entry into your terminal will do anything besides cause your shell to spew errors about unrecognized commands.

cmd-wget

Having seen this before (Blind Leading the Blind), it would seem this is the trendy, stupid mistake to make. You know what -m does? It mirrors. It does not download page requisites, and it recurses infinitely. Enjoy your gigantic mess.

cmd-profile

Last but not least… the author. A “self-appointed Linux guru”, to be sure. It would seem that the worst dreck always comes from those who think they know something. The overconfident make stupid mistakes, such as this article, which is nothing but a series of stupid mistakes.

The author demonstrated knowledge roughly comparable to that of consumer-level support such as Geek Squad, but at least they have the decency to supply their employees with a handbook and some fire-and-forget utilities so that the employees’ ineptitude doesn’t actually do damage, most of the time.

Perhaps the Laptop Logic people should stick to pricing out laptops and writing video game guides, where hopefully their terrible advice isn’t able to do any serious damage.

  • Share/Bookmark
5 December 2009 Uncategorized

28 Comments to Command Line Idiocy

  1. ha ha. that history screenshot is priceless.

  2. ian on 5 December 2009
  3. grep -i does not disable case-sensitivity. It enables case-insensitivity. You are dumb.

  4. nlw on 5 December 2009
  5. Ah, yes, the infamous Dunning-Kruger Effect. The less you know, the more you think you do.

  6. owk on 5 December 2009
  7. Congratulations! You’ve successfully reinforced the rude elitist image that many Linux advocates have tried over the past few years to erase.

    While the author of the article you ridicule may be guilty of overestimating her own knowledge, your “rebuttal” will no doubt put her in his place and ensure that Linux will be the last topic to be addressed in the near future. No doubt, you’ve successfully protected many people from hearing about Linux at all. Bravo! Well done!

    Instead of being all snarky, maybe email the author(s) of these kinds of things and be a real advocate — offer some pointers, gently correct the errors, and so on.

    Yes, the author has a lot to learn. But they can either be humiliated or they can be educated. Your choice, pick wisely.

  8. Joe Brockmeier on 5 December 2009
  9. Joe Brockmeier — I think the original author very much deserves this. For every good bit of advice given, it seems two bits of disinformation are spread.

    Plenty of helpful users are around in various distro’s IRC channels, but writing a generic list like this without even checking to see that your commands work? That’s disingenuous, probably just a way for a lousy publication to up their page views by attracting the Linux crowd.

  10. foobarnix on 5 December 2009
  11. Thanks, I really enjoyed reading the post. It’s funny how vocal ubuntards know less about UNIX than non-ubuntards.

  12. luser on 5 December 2009
  13. “I think the original author very much deserves this.”

    They “deserve” being ripped on? Is that the community you want to be part of? “Hey, you tried something you’re not ready for, so we’re all going to laugh at you now!”

    All this approach does is convince people they shouldn’t try in the first place. They might get it wrong, and instead of a warm and welcoming community that says “hey, that kind of fell flat – here’s where you went wrong, let’s fix it,” it says “wow, are you stupid! I’m going to ridicule you because I know more than you!”

    I’m not arguing the original author had created a brilliant piece, but they probably thought they were doing some good and also displaying some enthusiasm about Linux.

    That’s someone that can be worked with, rather than shot down.

  14. Joe Brockmeier on 5 December 2009
  15. My perspective is that good, contributory users will find their way. Having spent time helping people on IRC (and perusing Ubuntu Forums), I’m astonished by the amount of disinformation that’s passed around.

    Of course, it’s a good thing that users want to help other users, but not when the solutions don’t work, or, worse, are destructive. I’ve seen well-meaning newbies tell others to use rm with just enough wrong syntax to wipe the home directory.

    My point is that, ideally, users should only respond if they’re reasonably sure their information is correct. In the case of this article, that step would have been literally pressing the enter key.

    Every step features a screenshot the wrong information being typed into a terminal, and just hitting enter would have shown the author the errors.

    I don’t know why newbies are coddled and given such allowances. To make a car analogy — as we geeks often do — If a well-meaning friend tells you that your car doesn’t need motor oil and you heed the advice and end up with a hefty repair bill, you’ll hold them liable.

    That physical accountability doesn’t exist in anonymous online forums, and yet it’s permissible for newbies to spread disinformation because they “mean well”.

    I understand that, as a community manager, you are all for the average person using Linux, but I am quite happy in my limited circle of experts whose advice I can actually trust without examining every command.

  16. foobarnix on 5 December 2009
  17. I read the talked of article. It was posted on digg a few days ago. Lately, there have been a a slew of these inaccurate to blatantly wrong articles showing up. And I think it all stinks. One article listed Freespire as a replacement for ‘Add/Remove Programs’ and one of the top 10 killer *apps* in Linux! Read that last sentence again =))

    Is this response warranted? I think so.

    The vast majority of Linux knowledge is found online, and found via search engines. Articles like this that will ultimately be read by a newbie (who ends up getting a ton of error messages at least) will only give Linux as a whole a bad reputation.

    If Brittany wishes to promote Linux, she can do so without filling the interwebs with such crap. Personally, I believe page hits is the goal of these articles.

  18. shane on 6 December 2009
  19. Great article, I loved the sarcasm! I’m definitely going to start following your blog.

  20. Robert V. Bolton on 6 December 2009
  21. Your treatment of the ‘grep’ section is nothing more than picking fights. While everything you said there is true, there’s no good reason to chastise someone for using ‘grep [Aa] $file’ instead of ‘grep -i a $file’. Both commands take up exactly the same number of characters. The same applies to the comment on ranges – I’d like to hear you explain how using ranges would help when looking for ‘a’ in a file, case-insensitively. Yes, if she had written ‘grep [aAbBcCdDiIjJkKlL01234] $file’, she would definitely need to be told that ‘grep -i [a-di-l0-4]‘ would be much better, but failing to reproduce the entire manpage of grep and a tutorial on regular expressions in the article does not constitute advocating idiotic syntax, and those new to Linux are certainly much better off using ‘grep [aAbBcCdDiIjJkKlL01234] $file’ than staring at their gnome-terminal window wondering what to do. It’s okay, you don’t have to find something wrong with every part of the article!

    That said, I thoroughly enjoyed the rest of the article, and I agree that _most_ of Brittany/Blair’s article is misleading and dangerous. Oh, and thanks for nudging me towards ‘ps f’ – I hadn’t seen that before

  22. SirPsychoS on 6 December 2009
  23. When I saw the original, I thought it was a spoof. Were you taken in by a spoof, or was I wrong, and the original article was sincere?

  24. freakwent on 6 December 2009
  25. “I don’t know why newbies are coddled and given such allowances. To make a car analogy — as we geeks often do — If a well-meaning friend tells you that your car doesn’t need motor oil and you heed the advice and end up with a hefty repair bill, you’ll hold them liable.”

    Because it takes no more effort to be a decent person than it does to take the piss out of someone. Even better, you might wind up with a long-term user and eventually contributor instead of putting someone off with the idea that our community is filled with arrogant elitists who get off on lording over the people who don’t know as much as they do.

  26. Joe Brockmeier on 6 December 2009
  27. rm -rf dir /

    will in fact delete your home directory and any other accessible file it encounters you dumb whit.

  28. anon on 6 December 2009
  29. I’m with Brockmeier on this one.

    Somehow I see the article in question and this blog’s response – going for the kill – more as a demonstration of absent social skills rather than self-embarrassment made by the author of the original article.

    Social skills and tolerance should really become a higher priority.

  30. Flo on 6 December 2009
  31. Well, at least the parts with the white background were okay. Pity about the opinionated shit throughout the rest of the article.

  32. Malcolm on 7 December 2009
  33. I think she deserved it. A train wreck of a list showing all-out incompetence is one thing. If she were JUST incompetent then maybe somethingproductivewould have come from a discrete e-mail correcting her,

    But following up the whole mess by calling herself a Linux guru? No, she had it coming. Is there a link to this blog anywhere? I wanna go trolling.

  34. Yaro on 7 December 2009
  35. @foobarnix:
    “My point is that, ideally, users should only respond if they’re reasonably sure their information is correct.”
    Free as in “Freedom” eh?
    You are a hypocrite!
    Where is your concept of freedom of speech?

    *IDEALLY* !!
    Strike one

    “USERS SHOULD *ONLY* RESPOND IF … ” !!!
    Strike two

    “THEY’RE *REASONABLY SURE* THAT THEIR INFORMATION IS CORRECT”
    Strike three.

    Freedom of speech, eh?
    Free as in freedom, eh?
    Free as in free speech, eh?

    Ok, now back to normal.
    How friendly did that rebuke sound?
    You didn’t feel very friendly thoughts about me, did you?

    Same with the n00b who’s starting out.
    You see, unless you’re Linus or someone, you were born piddling and stuff and learnt things one at a time yourself.

    Can’t you allow another person to do the same?

    What if Linus or Andrew or RMS publicly humiliate you on LKML or whatever various mailing lists ytou subscribe to, just because you dont get the latest scheduler algorithm?

    Do you like that?

    Could you simply not have said:

    “The article needs a few corrections, this is how it should be…”

  36. beenthereseenthat on 7 December 2009
  37. If you write a bad piece full of errors this is the type of response you deserve. If she has any future at all in writing she will follow-up with a corrected piece.

  38. Seth Smith on 8 December 2009
  39. @Seth : Follow up with a corrected article? How? The anonymous author of this article doesn’t claim to have contacted Blair at all. Pretty cowardly article with an arrogant tone – disappointing in the context of the rest of Ubuntard.

  40. Scaine on 20 February 2010
  41. I think this is a necessary step towards purging the web of cancer.

  42. Boo Radley on 5 March 2010
  43. Hey, ls -lh does do something! From the ls man page:
    -h, –human-readable
    with -l, print sizes in human readable format (e.g., 1K 234M 2G)

    Please be accurate in your rebuttals.

  44. J Milner on 27 March 2010
  45. I stumbled onto this blog while reading some of my normal “news” regarding the Linux community.

    Take my comments for what they are worth, that being an anonymous internet reader/user.

    The original “article” needs to be blasted for the simple fact that an “average” pc user migrating to Linux from another OS needs to really learn what the command line is all about, and how the system works.

    I personally have a “love-hate” feeling towards Ubuntu and a few other variants of the Debian OS. While I understand that they are trying to make a distribution “Windows user friendly”, at the same time they are making it too much like Windows where the sudo command is “too easy” to use.

    Go back to “Unix 101″ and think about what root privileges really mean. Using sudo gives a user too much “power” over the whole system. Ubuntu and the distros based on it make it too easy.

    By the same token, Ubuntu has come a long way with making hardware “just work” with a default OS install. For that, I must commend them. Making that work just might get a few people to “ditch” paying for an OS, and actually use a free OS.

    The bottom line is, if someone is going to write an “article” about a Unix-based OS, they need to have the facts correct, and they need to do some error-checking.

  46. Steve on 1 July 2010

Leave a comment






Subscribe to receive your Secret Decoder Ring!

Follow our Twats



No WWW - For a better web

Subscribe
  • Steve:
    I stumbled onto this blog while reading some of my normal "news" regarding the L...
  • Kris Gesling:
    Sorry but I just to join the campaign for reason and logic but I couldn't stand ...
  • Amy:
    haha.. Well. Good to see that ya're finally up and running again. :D And i prom...
  • Steve:
    Having personally given up on any kind of volunteering in 2006 it should be note...
  • forkbomb:
    I've given up on editing Wikipedia excepting those occasional situations where I...