Archive for tips

Download folder with all of its subfolders using FTP

// July 2nd, 2009 // No Comments » // tips

Connect to the host.

[promt] ftp <hostname>

Set mode to binary
ftp> binary

cd to the directory to be download
ftp> cd /folder/to/download/

Get rid of comfirming every transfer
ftp> prompt

Download folder and its subfolder
mget *

Compress a specfic folder using tar

// June 24th, 2009 // No Comments » // tips

Generally a folder is compressed by

tar -czvf archivename.tgz /path/to/folder/

The problem is that when archivename.tgz is untarred the folder structure would be

path > to > folder

For the archivename.tgz to have just the folder and all of its contents, use the -C (change directory) option

tar -C /path/to -czvf archivename.tgz folder/