Thanks ! I changed that specific point my command looks way cleaner now ! But I still use the find command to extract the names with -printf “%Pn” to tar only the files without the parent folder and ././files. I prefere it that way, it looks cleaner. But -type d,f is useless !
use find to export the list, and then check it before you let tar run on that output
This seems a more secure way of doing things. Do you have any personal experience with piped tar commands that back slashed and put your system at risk?
Edit: I just found an easier way… (cd testar/ && tar -czvf …/mydir.tgz {*,.*}) Which includes hidden files without parent folder and ./ !