- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /usr/bin/tar: The parameter list is too long
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 08:17 PM
тАО10-13-2002 08:17 PM
I'm using HP-UX 10.20. I've around 415156 files in a directory and want to take backup of specific files. when I tried to ls or tar the directory, it failed with the follg message.
********************
# tar cvf ttjune.tar *jun*
sh: /usr/bin/tar: The parameter list is too long.
********************
Can someone help me on how to do the backup?
Many thanx in advance.
Solved! Go to Solution.
- Tags:
- Arg list too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 08:53 PM
тАО10-13-2002 08:53 PM
Re: /usr/bin/tar: The parameter list is too long
tar is only capable of archiving a maximum of 2GB. try to execute the same command but decreasing the list for backup. *jun* may exceed 2 gb.
hope this helps.
regards,
danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 08:59 PM
тАО10-13-2002 08:59 PM
Re: /usr/bin/tar: The parameter list is too long
FYI, total size of the directory is around 22GB with 415156 files. Each file size may be between 1 to 20Mb.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 09:11 PM
тАО10-13-2002 09:11 PM
Re: /usr/bin/tar: The parameter list is too long
The first is that your ls list is too long.
Try this command to confirm this
# getconf ARG_MAX
20478
If this is the result then you need to make changes to your kernel.
The second item is that 'tar' is not supported over 2Gb. The solution is to use a different backup command or get 'GNU tar'
- Tags:
- getconf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 09:40 PM
тАО10-13-2002 09:40 PM
Re: /usr/bin/tar: The parameter list is too long
At a minimum you will need to install patch PHKL_16751 and any dependancies. This may not solve your problem, as there may still be a limit. Have a look at the posting from last year, which has has a similar problem.
http://bizforums.itrc.hp.com/cm/QuestionAnswer/0,,0x5188abe92dabd5118ff10090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 09:41 PM
тАО10-13-2002 09:41 PM
Re: /usr/bin/tar: The parameter list is too long
How to change ARG_MAX? Is it dependent on other parameters?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 09:48 PM
тАО10-13-2002 09:48 PM
Re: /usr/bin/tar: The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 09:50 PM
тАО10-13-2002 09:50 PM
Re: /usr/bin/tar: The parameter list is too long
Make sure that you create an ignite (make recovery) tape before doing any kernel changes.
# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/?mn (note the use of the no-rewind command). Also here is a link to where you can the latest ignite software.
http://www.software.hp.com/products/IUX/download.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 10:22 PM
тАО10-13-2002 10:22 PM
Re: /usr/bin/tar: The parameter list is too long
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2002 10:41 PM
тАО10-13-2002 10:41 PM
Re: /usr/bin/tar: The parameter list is too long
This problem is due to the no of arguments passed to tar exceeding the maximum limit as specified by ARG_MAX.
This is defined in limits.h though dont exactly now how to change this.
An alternate workaround for this problem to reduce the arguments to tar.
Use some thing like
tar cvf ttjune.tar [a-c]*jun*
and then
tar rvf ttjune.tar [d-f]*jun*
and so on.
Depends on how your files are named.
Alternate and easy option is to write a script to move these files to another directory (a script because "mv *jun* /june" will also fail) and then just tar the entire directory.
HTH
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 08:41 PM
тАО10-14-2002 08:41 PM
Re: /usr/bin/tar: The parameter list is too long
Not sure if this will be enough though. That's a lot of files....
Check out this link for more information about this parameter:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe58b8cc5e03fd6118fff0090279cd0f9,00.html
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:18 PM
тАО10-14-2002 11:18 PM
Re: /usr/bin/tar: The parameter list is too long
try to do tar on the catalogue where the files are in. I had the exact same problem a while ago and solved it like that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:25 PM
тАО10-14-2002 11:25 PM
Re: /usr/bin/tar: The parameter list is too long
Paul, Could you pls elaborate on that? Thanx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:34 PM
тАО10-14-2002 11:34 PM
Re: /usr/bin/tar: The parameter list is too long
ie
mkdir jun
cp *jun* jun/
tar cvf jun.tar ./jun
this should do the trick?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2002 11:55 PM
тАО10-14-2002 11:55 PM
Re: /usr/bin/tar: The parameter list is too long
wont that give the same error (parameter list is too long) when attempting that copy?
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 12:21 AM
тАО10-15-2002 12:21 AM
Re: /usr/bin/tar: The parameter list is too long
then you have to make a script..
make a directory somewhere..
mkdir /tmp/delete
Then you make a logfile of all the entries you want to copy..
xargs ls -1 *jun* > /tmp/delete/delete.log (or something)
wait until the file has been created and then make a script with vi
-----
for i in $(CAT /tmp/delete/delete.log)i do
cp -p /"where your files are"/$i /tmp/delete/
done
-----
then wait again until all the files have been copied to that loction and do the tar thingie I wrote to you earlier
This should do the trick (I hope =)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2002 12:26 AM
тАО10-15-2002 12:26 AM
Re: /usr/bin/tar: The parameter list is too long
Oh, forgot half of it =)
before doing the tar thingie, yo have to save the script ie
copy.sh
and then do a chmod on it
chmod 755 copy.sh
to make it executble
start it with
./copy.sh
and then sit back and wait for all the files to be copied and THEN do the tar-thingie =)