What is maximum number of files you can store in a tar archive under Solaris 11?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I need to store a large number of files (> 100,000) in a tar archive and have run into the error: /bin/sh: /bin/tar: cannot execute [Arg list too long].
Are there limits with UNIX Solaris tar or GNU tar? Or, is this a ZFS issue? I am running Solaris 11.3 with ZFS.
solaris tar zfs limit gnu
add a comment |Â
up vote
1
down vote
favorite
I need to store a large number of files (> 100,000) in a tar archive and have run into the error: /bin/sh: /bin/tar: cannot execute [Arg list too long].
Are there limits with UNIX Solaris tar or GNU tar? Or, is this a ZFS issue? I am running Solaris 11.3 with ZFS.
solaris tar zfs limit gnu
1
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
2
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
The error message is from/bin/sh
(failing onexecve
), not fromtar
(as you can guess). If you replacetar
byls -l
you'll get the same error
â Basile Starynkevitch
Nov 20 '17 at 12:01
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I need to store a large number of files (> 100,000) in a tar archive and have run into the error: /bin/sh: /bin/tar: cannot execute [Arg list too long].
Are there limits with UNIX Solaris tar or GNU tar? Or, is this a ZFS issue? I am running Solaris 11.3 with ZFS.
solaris tar zfs limit gnu
I need to store a large number of files (> 100,000) in a tar archive and have run into the error: /bin/sh: /bin/tar: cannot execute [Arg list too long].
Are there limits with UNIX Solaris tar or GNU tar? Or, is this a ZFS issue? I am running Solaris 11.3 with ZFS.
solaris tar zfs limit gnu
edited Nov 20 '17 at 1:33
Jeff Schaller
32.1k849109
32.1k849109
asked Nov 20 '17 at 1:22
Matt Holliday
113
113
1
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
2
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
The error message is from/bin/sh
(failing onexecve
), not fromtar
(as you can guess). If you replacetar
byls -l
you'll get the same error
â Basile Starynkevitch
Nov 20 '17 at 12:01
add a comment |Â
1
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
2
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
The error message is from/bin/sh
(failing onexecve
), not fromtar
(as you can guess). If you replacetar
byls -l
you'll get the same error
â Basile Starynkevitch
Nov 20 '17 at 12:01
1
1
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
2
2
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
The error message is from
/bin/sh
(failing on execve
), not from tar
(as you can guess). If you replace tar
by ls -l
you'll get the same errorâ Basile Starynkevitch
Nov 20 '17 at 12:01
The error message is from
/bin/sh
(failing on execve
), not from tar
(as you can guess). If you replace tar
by ls -l
you'll get the same errorâ Basile Starynkevitch
Nov 20 '17 at 12:01
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T
option:
tar -c -f output.tar -T filelist.txt
Tar can also receive the file list from standard input by using -
as the file name. For example, if you want to create an archive containing all files and subdirectories of mydir
, you can pass the output of find
to tar:
find mydir | tar -c -f output.tar -T -
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely ash
limit.csh
has a much larger limit. Runningcsh<enter>host% tar -cvf tarfile.tar *
can work when running the same command undersh
fails with anarg list is too long
error.
â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with thecsh
and better luck with thesh
shell for this. But in this case I think creating an include file with the-I
option would work better than passing the files as args.
â sleepyweasel
Nov 20 '17 at 19:04
Please read thetar
man page before answerig questions, the-T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the-I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar isgtar
,
â schily
Jun 28 at 7:48
add a comment |Â
up vote
1
down vote
As others have said, the issue is (probably) the length of the command
and not the size of the archive.ÃÂ
You should be able to do
tar cf tarfile file001 file002 ⦠file100
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
Alternatively, do
tar cf tarfile file001to create the archive,
and then
tar cf tarfile file002 ⦠file100(possibly with
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
xargs
) to add to it.
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T
option:
tar -c -f output.tar -T filelist.txt
Tar can also receive the file list from standard input by using -
as the file name. For example, if you want to create an archive containing all files and subdirectories of mydir
, you can pass the output of find
to tar:
find mydir | tar -c -f output.tar -T -
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely ash
limit.csh
has a much larger limit. Runningcsh<enter>host% tar -cvf tarfile.tar *
can work when running the same command undersh
fails with anarg list is too long
error.
â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with thecsh
and better luck with thesh
shell for this. But in this case I think creating an include file with the-I
option would work better than passing the files as args.
â sleepyweasel
Nov 20 '17 at 19:04
Please read thetar
man page before answerig questions, the-T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the-I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar isgtar
,
â schily
Jun 28 at 7:48
add a comment |Â
up vote
3
down vote
This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T
option:
tar -c -f output.tar -T filelist.txt
Tar can also receive the file list from standard input by using -
as the file name. For example, if you want to create an archive containing all files and subdirectories of mydir
, you can pass the output of find
to tar:
find mydir | tar -c -f output.tar -T -
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely ash
limit.csh
has a much larger limit. Runningcsh<enter>host% tar -cvf tarfile.tar *
can work when running the same command undersh
fails with anarg list is too long
error.
â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with thecsh
and better luck with thesh
shell for this. But in this case I think creating an include file with the-I
option would work better than passing the files as args.
â sleepyweasel
Nov 20 '17 at 19:04
Please read thetar
man page before answerig questions, the-T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the-I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar isgtar
,
â schily
Jun 28 at 7:48
add a comment |Â
up vote
3
down vote
up vote
3
down vote
This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T
option:
tar -c -f output.tar -T filelist.txt
Tar can also receive the file list from standard input by using -
as the file name. For example, if you want to create an archive containing all files and subdirectories of mydir
, you can pass the output of find
to tar:
find mydir | tar -c -f output.tar -T -
This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T
option:
tar -c -f output.tar -T filelist.txt
Tar can also receive the file list from standard input by using -
as the file name. For example, if you want to create an archive containing all files and subdirectories of mydir
, you can pass the output of find
to tar:
find mydir | tar -c -f output.tar -T -
answered Nov 20 '17 at 7:49
Johan Myréen
6,93711322
6,93711322
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely ash
limit.csh
has a much larger limit. Runningcsh<enter>host% tar -cvf tarfile.tar *
can work when running the same command undersh
fails with anarg list is too long
error.
â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with thecsh
and better luck with thesh
shell for this. But in this case I think creating an include file with the-I
option would work better than passing the files as args.
â sleepyweasel
Nov 20 '17 at 19:04
Please read thetar
man page before answerig questions, the-T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the-I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar isgtar
,
â schily
Jun 28 at 7:48
add a comment |Â
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely ash
limit.csh
has a much larger limit. Runningcsh<enter>host% tar -cvf tarfile.tar *
can work when running the same command undersh
fails with anarg list is too long
error.
â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with thecsh
and better luck with thesh
shell for this. But in this case I think creating an include file with the-I
option would work better than passing the files as args.
â sleepyweasel
Nov 20 '17 at 19:04
Please read thetar
man page before answerig questions, the-T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the-I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar isgtar
,
â schily
Jun 28 at 7:48
1
1
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely a
sh
limit. csh
has a much larger limit. Running csh<enter>host% tar -cvf tarfile.tar *
can work when running the same command under sh
fails with an arg list is too long
error.â Andrew Henle
Nov 20 '17 at 12:58
You are exceeding the maximum size of arguments that can be passed to a program. To be specific, that's likely a
sh
limit. csh
has a much larger limit. Running csh<enter>host% tar -cvf tarfile.tar *
can work when running the same command under sh
fails with an arg list is too long
error.â Andrew Henle
Nov 20 '17 at 12:58
I've usually had the issue with the
csh
and better luck with the sh
shell for this. But in this case I think creating an include file with the -I
option would work better than passing the files as args.â sleepyweasel
Nov 20 '17 at 19:04
I've usually had the issue with the
csh
and better luck with the sh
shell for this. But in this case I think creating an include file with the -I
option would work better than passing the files as args.â sleepyweasel
Nov 20 '17 at 19:04
Please read the
tar
man page before answerig questions, the -T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the -I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar is gtar
,â schily
Jun 28 at 7:48
Please read the
tar
man page before answerig questions, the -T
option switches on Trusted Extensions and this is definitely not what you like. You probably ment the -I
option...or did you refer to GNU tar? Then you should know that the official name for GNU tar is gtar
,â schily
Jun 28 at 7:48
add a comment |Â
up vote
1
down vote
As others have said, the issue is (probably) the length of the command
and not the size of the archive.ÃÂ
You should be able to do
tar cf tarfile file001 file002 ⦠file100
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
Alternatively, do
tar cf tarfile file001to create the archive,
and then
tar cf tarfile file002 ⦠file100(possibly with
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
xargs
) to add to it.
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
add a comment |Â
up vote
1
down vote
As others have said, the issue is (probably) the length of the command
and not the size of the archive.ÃÂ
You should be able to do
tar cf tarfile file001 file002 ⦠file100
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
Alternatively, do
tar cf tarfile file001to create the archive,
and then
tar cf tarfile file002 ⦠file100(possibly with
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
xargs
) to add to it.
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
add a comment |Â
up vote
1
down vote
up vote
1
down vote
As others have said, the issue is (probably) the length of the command
and not the size of the archive.ÃÂ
You should be able to do
tar cf tarfile file001 file002 ⦠file100
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
Alternatively, do
tar cf tarfile file001to create the archive,
and then
tar cf tarfile file002 ⦠file100(possibly with
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
xargs
) to add to it.As others have said, the issue is (probably) the length of the command
and not the size of the archive.ÃÂ
You should be able to do
tar cf tarfile file001 file002 ⦠file100
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
Alternatively, do
tar cf tarfile file001to create the archive,
and then
tar cf tarfile file002 ⦠file100(possibly with
tar uf tarfile file101 file102 ⦠file200
tar uf tarfile file201 file202 ⦠file300
ï¸Â
xargs
) to add to it.answered Nov 24 '17 at 20:51
G-Man
11.6k82657
11.6k82657
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
add a comment |Â
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
Just be aware that updating a tar file with the number of entries in question can be excruciatingly slow.
â Andrew Henle
Nov 27 '17 at 17:17
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405692%2fwhat-is-maximum-number-of-files-you-can-store-in-a-tar-archive-under-solaris-11%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
How do you make the archive?
â NickD
Nov 20 '17 at 1:35
2
Appearances are a limit to tarâÂÂs argument list, not contents.
â Jeff Schaller
Nov 20 '17 at 1:38
As the error seems to be related to the number of arguments that have been passed on the command line, I think it would be useful to see what was the command you used for this purpose.
â Scantlight
Nov 20 '17 at 1:57
The error message is from
/bin/sh
(failing onexecve
), not fromtar
(as you can guess). If you replacetar
byls -l
you'll get the same errorâ Basile Starynkevitch
Nov 20 '17 at 12:01