gzip -cr
Hi,
tried the following drwx------ 6 oracle oinstall 4.0K May 26 15:12 . [oracle@INPRJ-ARMCSG01 ~]$ mkdir test_dir [oracle@INPRJ-ARMCSG01 ~]$ cd test_dir [oracle@INPRJ-ARMCSG01 test_dir]$ touch abc.txt [oracle@INPRJ-ARMCSG01 test_dir]$ touch def.txt [oracle@INPRJ-ARMCSG01 test_dir]$ cd .. [oracle@INPRJ-ARMCSG01 ~]$ gzip -cr test_dir > test_dir.gz [oracle@INPRJ-ARMCSG01 ~]$ ls -lhtra -rw------- 1 oracle oinstall 179 Apr 27 20:19 .Xauthority -rw------- 1 oracle oinstall 35 May 26 10:43 .lesshst -rw------- 1 oracle oinstall 14K May 26 13:17 .bash_history drwxr-xr-x 2 oracle oinstall 4.0K May 26 15:22 test_dir -rw-r--r-- 1 oracle oinstall 56 May 26 15:22 test_dir.gz drwx------ 7 oracle oinstall 4.0K May 26 15:22 . [oracle@INPRJ-ARMCSG01 ~]$ rm -rf test_dir [oracle@INPRJ-ARMCSG01 ~]$ ls -lhtra -rw------- 1 oracle oinstall 179 Apr 27 20:19 .Xauthority -rw------- 1 oracle oinstall 35 May 26 10:43 .lesshst -rw------- 1 oracle oinstall 14K May 26 13:17 .bash_history -rw-r--r-- 1 oracle oinstall 56 May 26 15:22 test_dir.gz drwx------ 6 oracle oinstall 4.0K May 26 15:22 . Now when I try to uncompress this file it does not take the form of the folder. tried gunzip -cd test_dir.gz > test_dir tried gunzip -d test_dir.gz - no results. Need help. |
From the gzip man page:
Code:
-r --recursive This does not work: Code:
gzip -r testdir > newfile I think you need tar to do what you want----eg Code:
tar -czf testdir.cmp testdir ##compresses testdir and its contents into "testdir.cmp" |
All times are GMT -5. The time now is 09:00 PM. |