Results 1 to 3 of 3
Hi Experts,
I have been using the below command in Sun Solaris for tar the .tmp files
tar -cvf temp.tar ./*/*.tmp
But when I use the same command in Linux, ...
- 09-21-2007 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 1
Tar large files in linux
Hi Experts,
I have been using the below command in Sun Solaris for tar the .tmp files
tar -cvf temp.tar ./*/*.tmp
But when I use the same command in Linux, I got "Argument too long list" error. I know this is because of the ARGS_MAX setup in Linux.
For workaround I used the below command, it printing all the files but at the end the tar has only few files not all of them.
find ./*/ -name '*.tmp' -print0| xargs -0 tar -cvf temp.tar
I dont knwo what may be the error in the above command. Please help.
Thanks,
Gally
- 09-22-2007 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
When you have a large list of files, I'd archive them with cpio (I'm assuming that you want all the .tmp files from the current directory downwards):
Use -ov instead of -o to list the files while cpio is archiving them. cpio is a much underrated (and underused) utility.Code:find . -name '*.tmp' -print -depth | cpio -o >myarchive.cpio
- 12-13-2010 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 1
thanks,was useful...


