- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Maxlength limit of command+parameters
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
08-05-2005 06:54 AM
08-05-2005 06:54 AM
By end of the day, I'll have to change permissions to 664 for all files under 'xyz'.
When I did a "chmod 664 `find xyz -type f`", it changed all the file permissions to my satisfaction.
When I did a `find xyz -type f|wc`, I got the following result:
4395 4395 124963
Isn't there a limit for length of the command line (in the forum i read it is 256 characters and someone else said it is 1024)!
Can anyone tell if the command I'm using will ever fail due to its length (today it is 12500 chars approx)?
I can use "find xyz -type f -exec chmod 664 {}\;", but that one is very slow as it invokes chmod for each and every file! Help please...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2005 07:21 AM
08-05-2005 07:21 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2005 07:43 AM
08-05-2005 07:43 AM
Re: Maxlength limit of command+parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2005 10:27 AM
08-05-2005 10:27 AM
Re: Maxlength limit of command+parameters
getconf LINE_MAX
(see man getconf for details).
BUT: There will never be a long enough line when your argument list is unbounded. In other words, when you find a directory with 10,000 files in it and type something like:
echo *
then the line length will be exceeded. So it is better to assume that you will always exceed the command line maximum length at the start and you'll always be safe. That's why xargs was created...to take an unbounded list of things and buffer them up so the line length is never exceeded.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2005 05:25 AM
08-08-2005 05:25 AM
Re: Maxlength limit of command+parameters
"getconf LINE_MAX" returned 2048. I'll make use of xargs as suggested.
Thanks again...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2005 05:27 AM
08-08-2005 05:27 AM