Reputation: 363
I need to create targ.gz file and contents of file should be at root folder
say. I want angle and Simple files at root of tarfile shown at bottom. Any suggestions. I tried as below but extra folder is created at root
tar -zcvf tarfile.tar.gz -C /example/tarFile .
./
./angle.txt
./Simple.jar
tar -zcvf tarfile.tar.gz -C /example/tarFile .
./angle.txt
./Simple.jar
Upvotes: 0
Views: 1917
Reputation: 667
Please try this
tar -czvf tarfile.tar.gz /example/tarFile
after creating tar file use cp
or mv
command to move anywhere you want.
Upvotes: 1