Sponsored Content
Full Discussion: Command line buffer limit?
Top Forums UNIX for Dummies Questions & Answers Command line buffer limit? Post 33410 by Perderabo on Saturday 4th of January 2003 03:54:19 PM
Old 01-04-2003
I think that you have some other problem. The various limits are found in <limits.h> or "man limits". The max length of a command line is 2048. A posix compliant OS may have a larger limit but it may not have a smaller limit. So you can depend on at least 2048. I often use commands longer than 255 characters on HP-UX.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sendmail message body buffer limit?

when sending the contents of a ascii file to the body of an email then sending it off. it seems sendmail is breaking up the lines with a "!" thus ruining the data. Has this ever happened to anyone? i am guessing there is a line buffer limit in either the mail command or in sendmail itself. ... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. Shell Programming and Scripting

grep line length limit

Hi Friends, I am having a funny problem with grep. When I run grep 'expr' file.txt things work fine. But when try to get the line number using the -n option, i.e, grep -n 'expr' file.txt I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded." If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies

3. Shell Programming and Scripting

How to Monitor printer buffer using unix command

Hi, I have 13jobs waiting in a printer queue.I am try to get the status and number of jobs using lpstat but i cant see any job is waiting in queue.i think those jobs are in printer buffer.is there any way to get the status of printer buffer too using unix command.please correct me if i am wrong. i... (1 Reply)
Discussion started by: sagii
1 Replies

4. UNIX for Advanced & Expert Users

How to limit the search to 'n' occurrences within a line

Hello All, I am trying to search one pattern across a file and then print it. But i need to delimit the search per line to 2 occurrences. How do i do that? Regards. (9 Replies)
Discussion started by: Linuxee
9 Replies

5. Shell Programming and Scripting

Problem with awk awk: program limit exceeded: sprintf buffer size=1020

Hi I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it The code is that: { if (NF==17){ print $0 }else{ fields=NF; all=$0; while... (2 Replies)
Discussion started by: fate
2 Replies

6. Programming

Is there a limit for a code line length in C?

Is there any stabdard limitation on size of a code line in C code? I am interesting in UNIX limitation, particulary on SUN. Thanks! (8 Replies)
Discussion started by: alex_5161
8 Replies

7. UNIX for Dummies Questions & Answers

Vim external command output to new buffer

Hi, From inside Vim, I'm looking for a way to use the contents of the current buffer, pass it to an external executable, and then return the output from the executable into a new Vim buffer. I know that I can do something like %!<executable>, but that will overwrite the contents of the... (3 Replies)
Discussion started by: konfushus
3 Replies

8. Shell Programming and Scripting

Ignore the 255 character limit of command line

Hi I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line? My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like... (5 Replies)
Discussion started by: agentgrecko
5 Replies

9. Programming

Limit line for perl

Hey guys, can help me out with this? How do i limit output for xml to 50 character? i tried *below* but doesnt work, it still print more than 50 characters. Thanks in advance printf "%-50s", "$testline\n"; (4 Replies)
Discussion started by: Nick1097
4 Replies

10. UNIX for Beginners Questions & Answers

Single line archive log files command if exceed certain limit in Linux

Hello Guys, Is there a single line archive command to zip or tar log files which is larger than certain size limit ? Do let me know if there is any. Thanks (7 Replies)
Discussion started by: UnknownGuy
7 Replies
PRLIMIT(1)							   User Commands							PRLIMIT(1)

NAME
prlimit - get and set process resource limits SYNOPSIS
prlimit [options] [--resource[=limits] [--pid PID] prlimit [options] [--resource[=limits] command [argument...] DESCRIPTION
Given a process ID and one or more resources, prlimit tries to retrieve and/or modify the limits. When command is given, prlimit will run this command with the given arguments. The limits parameter is composed of a soft and a hard value, separated by a colon (:), in order to modify the existing values. If no lim- its are given, prlimit will display the current values. If one of the values is not given, then the existing one will be used. To specify the unlimited or infinity limit (RLIM_INFINITY), the -1 or 'unlimited' string can be passed. Because of the nature of limits, the soft limit must be lower or equal to the high limit (also called the ceiling). To see all available resource limits, refer to the RESOURCE OPTIONS section. soft:hard Specify both limits. soft: Specify only the soft limit. :hard Specify only the hard limit. value Specify both limits to the same value. GENERAL OPTIONS
-h, --help Display help text and exit. --noheadings Do not print a header line. -o, --output list Define the output columns to use. If no output arrangement is specified, then a default set is used. Use --help to get a list of all supported columns. -p, --pid Specify the process id; if none is given, the running process will be used. --raw Use the raw output format. --verbose Verbose mode. -V, --version Display version information and exit. RESOURCE OPTIONS
-c, --core[=limits] Maximum size of a core file. -d, --data[=limits] Maximum data size. -e, --nice[=limits] Maximum nice priority allowed to raise. -f, --fsize[=limits] Maximum file size. -i, --sigpending[=limits] Maximum number of pending signals. -l, --memlock[=limits] Maximum locked-in-memory address space. -m, --rss[=limits] Maximum Resident Set Size (RSS). -n, --nofile[=limits] Maximum number of open files. -q, --msgqueue[=limits] Maximum number of bytes in POSIX message queues. -r, --rtprio[=limits] Maximum real-time priority. -s, --stack[=limits] Maximum size of the stack. -t, --cpu[=limits] CPU time, in seconds. -u, --nproc[=limits] Maximum number of processes. -v, --as[=limits] Address space limit. -x, --locks[=limits] Maximum number of file locks held. -y, --rttime[=limits] Timeout for real-time tasks. EXAMPLES
prlimit --pid 13134 Display limit values for all current resources. prlimit --pid 13134 --rss --nofile=1024:4095 Display the limits of the RSS, and set the soft and hard limits for the number of open files to 1024 and 4095, respectively. prlimit --pid 13134 --nproc=512: Modify only the soft limit for the number of processes. prlimit --pid $$ --nproc=unlimited Set for the current process both the soft and ceiling values for the number of processes to unlimited. prlimit --cpu=10 sort -u hugefile Set both the soft and hard CPU time limit to ten seconds and run 'sort'. SEE ALSO
ulimit(1), prlimit(2) NOTES
The prlimit system call is supported since Linux 2.6.36, older kernels will break this program. AUTHORS
Davidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie. AVAILABILITY
The prlimit command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux July 2014 PRLIMIT(1)
All times are GMT -4. The time now is 01:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy