Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Monday, October 25th, 2010, 9:59 am

Cheat Sheets and the Command Line

Connections
The command-line access still reigns in the back room

ALMOST anything which can be done from the command-line can also be done using a GUI, and vice versa. The question is, which can be done more flexibly and quickly? There is no “correct” paradigm as both are necessary under different circumstances, depending on the nature of the task and the learning curve involved.

Are you a GUI person? Or do you consider yourself to be a command-line guru? A combination of both paradigms is probably the best one can have; it is abundantly clear that some tasks do require a GUI to be carried out efficiently without much training. Standardised syntax and GUI usually ensure that skills are transferable, too.

Personally, I am a GUI person around 95% of the time. I still use the command-line interface on the desktop (e.g. “ffmpeg2theora -p preview –sync ./Desktop/file“) but especially for quick server operations (e.g. “tail -n600 /var/log/httpd/thelog-error_log” or “/etc/init.d/httpd restart” or “vim etc/mime.types” or “/sbin/iptables -A INPUT -s [IP] -j DROP“). SFTP with a graphical user interface is still a lot better for certain types of file management tasks. It is impossible to say very generally if a GUI application which accomplishes task X is better than a command-line counterpart. It very much depends on the circumstances and the skills/training. So, to rule out the command-line and calling it arcane or unnecessary is a foolish thing to do.

One of the merits of the command-line is verbosity. It is a merit, not a design flaw or built-in drawback, especially in specific circumstances. I use the command-line interface for little scripts which are better off run manually and in stages because things may go wrong in the middle and easily cause trouble. For instance, here is what I run when a new version of WordPress comes out (3.0.1 in the examples below):

cd
wget http://wordpress.org/wordpress-3.0.1.zip
unzip wordpress-3.0.1.zip
cd ~/wordpress
rm wp-config-sample.php
rm -rf wp-content/
cp -r * ~/public_html
rm -rf ~/wordpress

There is a lot that can go wrong in any of these stages and failure to achieve the task perfectly may mean a broken Web site with little information as to what went wrong or how to fix it.

The bottom line is, do not dismiss those who favour the command-line. These are usually the people who keep the servers you connect to running.

One Response to “Cheat Sheets and the Command Line”

  1. Dirk Koerwitz Says:

    Great blog! I’ve bookmarked it to read it later as I’m pretty new to this. Thanks.

Technical Notes About Comments

Comments may include corrections, additions, citations, expressions of consent or even disagreements. They should preferably remain on topic.

Moderation: All genuine comments will be added. If your comment does not appear immediately (a rarity), it awaits moderation as it contained a sensitive word or a URI.

Trackbacks: The URI to TrackBack this entry is:

https://schestowitz.com/Weblog/archives/2010/10/25/cheat-sheets/trackback/

Syndication: RSS feed for comments on this post RSS 2

    See also: What are feeds?, Local Feeds

Comments format: Line and paragraph breaks are automatic, E-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Back to top

Retrieval statistics: 21 queries taking a total of 0.141 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|