Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Linux terminal One-Liners

__/ [ The Ghost In The Machine ] on Wednesday 22 February 2006 17:00 \__

> In comp.os.linux.advocacy, Roy Schestowitz
> <newsgroups@xxxxxxxxxxxxxxx>
>  wrote
> on Wed, 22 Feb 2006 06:17:33 +0000
> <dtgvoj$8eo$1@xxxxxxxxxxxxxxxxx>:
>> http://www.opentechsupport.net/forums/archive/topic/20438-1.html
>     Shit!  Too complicated!  Where's my GUI?  Where's the
>     ease of use?  I wanna mouseclick!  WAAAAAH!
> - hypothetical response from a frustrated Windows user
> ;-)
> There are a fair number of additional pipelining options,
> however -- date in particular can print an arbitrary format.
> But that's what manpages are for. :-)

Here's one of my latest script:

cd /tmp/   # need full path for cron
rm -rf /home/roy/public_html/wordpress #
wget http://static.wordpress.org/builds/wordpress-`date +%Y-%m-%d`.tar.gz
rm /tmp/wordpress-`date +%Y-%m-%d`.tar # delete
gunzip /tmp/wordpress-`date +%Y-%m-%d`.tar.gz
tar xf /tmp/wordpress-`date +%Y-%m-%d`.tar # uncompress and untar
cp -rf /tmp/wordpress /home/roy/public_html/ # overwrite old files
rm -rf /tmp/wordpress # clean up

Without using semi-colons, it could still be shrunk to occupy just 4 lines
or so. What does it do? It goes to the WordPress site, it finds the latest
nightly  build, it then downloads it, uncompresses the file, extracts  all
the  files, puts them on a public Webspace and optionally protects  every-

Imagine  yourself doing all of this in Windows rather than let a cron  job
keep  the Web-based software up-to-date, /without/ having /any/ such func-
tionality at software-level.

The command-line gives power. If the newbie does not want to be efficient,
(s)he  can  use the GUI. It's there, so use it. It has become a  streotype
and  a  fallacy: Linux users choose the command-line, so the  command-line
must  be  vital. If you want to burn CD's with nightly copies of your  Web
sites  and  then  open the CD tray in the morning, script it.  *Once*.  OR
click your way through life instead. Day, by day, by day...


Roy S. Schestowitz      |    /earth: file system full
http://Schestowitz.com  |    SuSE Linux     |     PGP-Key: 0x74572E8E
  5:15pm  up 5 days  5:34,  8 users,  load average: 1.06, 1.08, 1.09
      http://iuron.com - help build a non-profit search engine

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index