Hi,
os :: ubuntu hardy
In a shell script, I am creating a .tar using this command
Code:
tar -zcvf dst/lib/library.tar.gz dst/lib
There are two problems:
1. The library.tar.gz is created but inside .tar the folder structure is like this : dist/lib/(all dirs and files). I don't need dist/lib structure inside .tar but all the dirs and files of dist/lib directly under .tar.
2. Using above command .tar is coming out around 7.7 mb in size but when I creating tar by manually selecting all dirs and files and creating .tar by right-click-menu>create archive>(.tat.gz option), .tar is coming out around 4.4 mb. Why is that difference? Is is possible to get more compression but keeping format to .tar.gz using 'tar' shell command?
3. Is it possible to move files when creating a .tar? (create and delete them) or shall I do it manually?
Thanks
Prashant