I tried to tar specific files for example from: /home/user/Desktop/source/file.txt
to /home/user/bin/tar_dir/files.tar
without having folders path in tar file so after unpacking I'd have only files next to files.tar
.
I found a few questions like that however presented solutions worked for me only if I have specific folder and tar all the files inside this folder. The solutions that worked for files were working only if I am in the folder with the files to tar. I wanted to run the command without going to source folder using command cd
etc. I'm also using tar --append
to add files to existing tar file.
I'm new in bash and stuck with this for 2 days and don't have any ideas. Do you have any suggestions?