wget command for windows

August 12, 2008 · Filed Under Joomla, Linux / Unix Commands · Comment 

You can copy the exe file from http://users.ugent.be/~bpuype/wget/#download

and paste the file into WINDOWS\system32 folder of your PC.

Now go to command prompt (Acessories > Command Prompt) and use wget command to download files  as you do in linux

eg.  wget http://joomlacode.org/gf/download/frsrelease/6828/22538/Joomla_1.0.15-Stable-Full_Package.zip

This will download Joomla 1.0.15 version on your machine

compress directory under Linux using shell prompt

July 11, 2008 · Filed Under Linux / Unix Commands · 1 Comment 

How can I compress a whole directory under Linux / UNIX using a shell prompt?

It is useful to backup files, email all files. Technically, it is called as a compressed archive. GNU tar command is best for this work. It can be use on remote Linux or UNIX server. It does two things for you:

1. Create the archive

2. Compress the archive

You need to use tar command as follows (syntax of tar command):
tar -zcvf archive-name.tar.gz directory-name
Where,

  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name

For example, you have directory called /home/demo/prog and you would like to compress this directory then you can type tar command as follows:
$ tar -zcvf demo-11-july-2008.tar.gz /home/demo/prog

Above command will create an archive file called demo-1-jan-2005.tar.gz in current directory. If you wish to restore your archive then you need to use following command (it will extract all files in current directory):
$ tar -zxvf demo-11-july-2008.tar.gz

Where,

  • -x: Extract files

If you wish to extract files in particular directory, for example in /tmp then you need to use following command:
$ tar -zxvf demo-11-july-2008.tar.gz -C /tmp
$ cd /tmp
$ ls