I often need to package and compress a folder from the command line, for example, before running updates so I have a fall back position.

The following works for me

tar -czf filename.tar.gz foldername

So when I had a folder named www and from the command prompt I could see it, and wanted to name the file www-040713.tar.gz it was

tar -czf www-040713.tar.gz www

c = create
z = compress
f = file

I was going round in circles trying to get WordPress permalinks to work on a Ubuntu server with Apache2 installed.

The .htaccess file was fine:

# BEGIN WordPress
#
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#

# END WordPress

However I still got Error 404 page not found when I went to siteurl.com/page-name rather than siteurl.com/?p=123

In the end it turns out I needed to make a tweak to the Apache virtualhost.conf file for the site in question:

By default in the section it had

AllowOverride None

This needed to be changed to

AllowOverride All

A quick

service apache2 reload

And, hey presto, permalinks were working again.