I have built a small perl/Tk app to allow some of our users who are uncomfortable w/ the command line to run certain tasks, one of which is to create a .tar file of directories containing up to several hundred .tif files. When they click the create .tar button I have it run a command similar to this (actual directory & file names changed here):
/usr/bin/tar -cf /data_dir/data.tar /data_dir/*
This command works fine for me, but I use ksh as my default shell. Most of our users are set up w/ csh as their default shell, though. In csh we get 'Arguments too long' returned when running this command. I know that there is a way to handle this using xargs, but after several reads through the man page I am still confused as to the correct syntax.
How do I pipe the above through xargs to allow it to tar up large directories?
BTW, this is using Solaris 5.6.
Thanks...
/usr/bin/tar -cf /data_dir/data.tar /data_dir/*
This command works fine for me, but I use ksh as my default shell. Most of our users are set up w/ csh as their default shell, though. In csh we get 'Arguments too long' returned when running this command. I know that there is a way to handle this using xargs, but after several reads through the man page I am still confused as to the correct syntax.
How do I pipe the above through xargs to allow it to tar up large directories?
BTW, this is using Solaris 5.6.
Thanks...