- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ERROR : /sbin/mv: Arg List or Environment too larg...
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
Forums
Discussions
Discussions
Discussions
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
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
04-01-2004 05:45 AM
04-01-2004 05:45 AM
ERROR : /sbin/mv: Arg List or Environment too large
When I give any command on my SCO unix
(cp,mv,tar) it gives me error message
ERROR : /sbin/mv: Arg List or Environment too large
Please tell me how to move my
file from
/oracle1/oracle8/OraHome/admin/jhab1/arch/*.dbf to /user/myfolder/arch/
Thanks,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 05:57 AM
04-01-2004 05:57 AM
Re: ERROR : /sbin/mv: Arg List or Environment too large
You would help a lot by simply cd'ing to the source directory so that the pathnames are much shorter.
cd oracle1/oracle8/OraHome/admin/jhab1/arch/
cp *.dbf /user/myfolder/arch/
If that is still too large then
cp [0-1]*.dbf /user/myfolder/arch/
cp [1-2]*.dbf /user/myfolder/arch/
and so on substituting your leading characters for [0-1].
Plan B:
cd oracle1/oracle8/OraHome/admin/jhab1/arch/
find . -type f -name '*.dbf' | cpio -pudvm /user/myfolder/arch/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 07:19 AM
04-01-2004 07:19 AM
Re: ERROR : /sbin/mv: Arg List or Environment too large
I hope, SCO has xargs, which cuts the huge lists into portions, mv can handle.
hth,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 11:51 AM
04-01-2004 11:51 AM
Re: ERROR : /sbin/mv: Arg List or Environment too large
Now this may me an artificial limit imposed by the OS to satisfy a standard. This was the case for Tru64. There it was controlled with: sysconfig -q proc exec_disable_arg_limit
This by default/ OOTB was set to 0, and just setting that to 1 allowed extreme argument lists. SCO may well have somethign similar.
In the mean time, just divide and conquer!
Do mv blah/blah/A* followed by mv blah/blah/B* and so on.
If that is too tedious... script it!
If that makes too many chunks, use smarter wildcard like : mv blah/blah/[ABCD]*
Good luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 07:44 PM
04-01-2004 07:44 PM
Re: ERROR : /sbin/mv: Arg List or Environment too large
ls /oracle1/oracle8/OraHome/admin/jhab1/arch | grep '.dbf$' | xargs -I FiLe mv FiLe /user/myfolder/arch
It might even be you can do the mv command by not using the full path name of all files to copy... This way only the dbf files are on the resulting command line instead of the absolute pathnames of all dbf files. A lot shorter!
Try this:
cd /oracle1/oracle8/OraHome/admin/jhab1/arch
mv *.dbf /user/myfolder/arch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 08:30 PM
04-01-2004 08:30 PM
Re: ERROR : /sbin/mv: Arg List or Environment too large
My sugession is to use find so that you get the absolute path and then move it one by one in a loop
for FILE in `find /oracle1/oracle8/OraHome/admin/jhab1/arch -name *.dbf -print`
do
mv $FILE /user/myfolder/arch
done
Kaps