tar command with a lot of arguments and z flag freezes
search cancel

tar command with a lot of arguments and z flag freezes

book

Article ID: 246175

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

On a particular Unix server, a script that launches a tar command with the argument -z to zip the content of a list of files does not work when launched with Dollar Universe, but works when launched via the crontab.

The command tar is launched trough a perl script with the below syntax:

my $crExec = system("tar -czpfv $archiveDraft * ");

When checking the process at system level we see it actually contains a huge list of files as argument, instead of using a folder as target to compress it:

username 15878 15194   0 22:00:27 ?             0:00 tar -czpfv /target_folder/tbi_0bck_temp_ejIf/draft/16533360
26_filelist_bck_indus.dat_FULL.tar.gz 20220427220007tbmTBM_0USB.log 20220428103005tbmTBM_0USE.log 20220428143232tbmTBM_0
USB.log 20220428143609tbmTBM_0USB.log 20220428220009tbmTBM_0USB.log 20220429103006tbmTBM_0USE.log 20220429220009tbmTBM_0

Environment

Release : 6.x

Component : DOLLAR UNIVERSE

OS: Unix/Linux

Cause

Unknown issue with the command tar with argument z and a huge list of arguments.

Resolution

Workaround:

Remove the -z argument from the tar command OR instead of passing a huge list of arguments (files), use a folder where all necessary files have been copied/moved to.