- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Will 'xargs' help on "parameter list 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
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
тАО01-23-2004 02:26 AM
тАО01-23-2004 02:26 AM
ls dir/*o
such that the output is
dir/file1.o
dir/file2.o
But, if there are too many files in the directory, I get the "parameter list too long" error message.
I believe that I can still get the desired output (shown above) when there are too many files - using the 'xargs' command - but am unclear on the syntax.
Help on this would be most appreciated!
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:32 AM
тАО01-23-2004 02:32 AM
Re: Will 'xargs' help on "parameter list too long"?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:32 AM
тАО01-23-2004 02:32 AM
Re: Will 'xargs' help on "parameter list too long"?
ls dir/*o | xargs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:33 AM
тАО01-23-2004 02:33 AM
Re: Will 'xargs' help on "parameter list too long"?
I am afraid it would not work for the ls. It could work for input commands.
ls dir | grep 'o$'
There are limits you can reach and the are defined in /usr/include/limits.h
I would nod advice you to change those but they will give you some insight.
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:56 AM
тАО01-23-2004 02:56 AM
Re: Will 'xargs' help on "parameter list too long"?
SEP - may have netted more points w/ attachmnet
SF - same error message
GV - OK, except omits dir name
JLP - Works! Thanks!
** Thread closed **
Thanks all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 02:57 AM
тАО01-23-2004 02:57 AM
Re: Will 'xargs' help on "parameter list too long"?
This will work for you:
find . -path './dir/*.o' -exec ls -l {} \;
or simply
find . -path './dir/*.o'
if all you want to do is list the .o files only in dir.
Now for a valid (and more efficient) use of xargs to replace the -exec clause in the command above:
find . -path './dir/*.o' | xargs ls -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 03:03 AM
тАО01-23-2004 03:03 AM
Re: Will 'xargs' help on "parameter list too long"?
find . -path './dir/*.o' | xargs ls -l10
This will reduce the number of processes (buffer=10)
Regards,
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 03:04 AM
тАО01-23-2004 03:04 AM
Re: Will 'xargs' help on "parameter list too long"?
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2004 03:06 AM
тАО01-23-2004 03:06 AM
Re: Will 'xargs' help on "parameter list too long"?
please read xargs -l10
e.g.
xargs -l10 ll
regards,
Jean-Luc