View Single Post
Old 2007-09-22, 11:31   #9
Xyzzy
 
Xyzzy's Avatar
 
Aug 2002

3×112×23 Posts
Default

Quote:
Xyzzy: Your command didn't seem to work. Perhaps if the 'z' had come first?
Works fine here:

Code:
m@p4:~$ ls -l
total 4
drwxr-xr-x 5 m m 4096 2007-09-22 07:25 Desktop

m@p4:~$ mkdir a

m@p4:~$ cd a

m@p4:~/a$ touch 1 2 3

m@p4:~/a$ ls -l
total 0
-rw-r--r-- 1 m m 0 2007-09-22 07:27 1
-rw-r--r-- 1 m m 0 2007-09-22 07:27 2
-rw-r--r-- 1 m m 0 2007-09-22 07:27 3

m@p4:~/a$ cd ..

m@p4:~$ tar -cvf a.tar a/
a/
a/2
a/1
a/3

m@p4:~$ gzip a.tar

m@p4:~$ rm -rf a/

m@p4:~$ ls -l
total 8
-rw-r--r-- 1 m m  149 2007-09-22 07:27 a.tar.gz
drwxr-xr-x 5 m m 4096 2007-09-22 07:25 Desktop

m@p4:~$ tar -xzvf a.tar.gz
a/
a/2
a/1
a/3

m@p4:~$ cd a

m@p4:~/a$ ls -l
total 0
-rw-r--r-- 1 m m 0 2007-09-22 07:27 1
-rw-r--r-- 1 m m 0 2007-09-22 07:27 2
-rw-r--r-- 1 m m 0 2007-09-22 07:27 3
Xyzzy is offline