Skip to main content

New answers tagged

0 votes

tar returning different exit code when wrapped inside if statement

The exit code of your command in the command substitution in the if statement might be zero, but its output, which is what you use in the comparison, is not the string 0. To use the exit status of a ...
Kusalananda's user avatar
  • 339k
0 votes

tar not excluding symlinked directories

create a textfile with all files/dirs to exclude from the tar archive and invoke tar with the --exclude-from="yourtextfile" option tar -zcvf /path/to/archive.tar.gz --exclude-from="...
z0d1ac's user avatar
  • 11
1 vote

tar not excluding symlinked directories

It is intended behaviour. It does exclude the file that you asked it to exclude, that is the file which is a symbolic link. Similarly, if you delete the symbolic link using rm, the file that the link ...
dotconfig's user avatar

Top 50 recent answers are included