I am trying to compress a folder with the tar command.
When I am trying to compress it, it works fine. The problem is with the file name.
Source path:
/data/file/
Destination path:
/data/repo/temp/file.tar.gz
tar zcvf $srcpath $destinationpath
I am executing the command from a different folder, and while extracting the folder I am getting all the sub directories instead of file folder alone.