![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Arg List too Long in SCP | chris1234 | UNIX for Dummies Questions & Answers | 5 | 02-27-2008 04:40 AM |
| ls -t arg list too long | CSU_Ram | UNIX for Dummies Questions & Answers | 4 | 05-05-2005 07:19 AM |
| arg list too long | encrypted | UNIX for Advanced & Expert Users | 8 | 11-12-2004 02:38 AM |
| command find returned bash: /usr/bin/find: Argument list too long | yacsil | Shell Programming and Scripting | 1 | 12-15-2003 02:38 PM |
| arg list too long | vingupta | UNIX for Dummies Questions & Answers | 5 | 08-02-2001 08:43 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Trying to tar specific files from a directory causes problems when the number of files is too large.
ls ~/logs | wc -l 5928 In the logs directory - I have 5928 files If I want to include all files with today's date - I run the following command tar cf ~/archive/LoadLogs_20060302.tar ~/logs/LoadLog_20060302_*.log However, I get the following error: /usr/bin/tar: Argument list too long Any suggestions on how to correct this would be appreciated. Thanks, Rick Last edited by dad5119; 03-02-2006 at 12:31 PM. |
| Forum Sponsor | ||
|
|
|
|||
|
You can specify an "include file" usually with a -I option. To use, create a directory listing into the include file:
ls -1 ~/logs/LoadLog_20060302_*.log > /tmp/tar.include Then run the tar command tar -cf ~/archive/LoadLogs_20060302.tar -I /tmp/tar.include |
|
|||
|
Argument list too long for multiple commands
Thanks for the suggestions - however when I use an asterisk in my matching criteria (even for the "ls" command) - I get the same error.
I guess the default limit for an argument list is used for ALL commands. Commands like "ls" "gzip" "tar" "cp" "mv" "cat" - all complain when I try to limit the argument list. I was hoping there was some shell configuration setting that would increase the allowable size - but I'm beginning to think that it's the programs problem - not the shell environment. Rick |
| Tags |
| linux |
| Thread Tools | |
| Display Modes | |
|
|