terminal input buffer size

Hello,


In terminal I run a command that waits for a user input, for example `base64`. I paste the text, but I can only paste up to 1024 symbols. Where is this limit set and how I can increase it?


Thanks.

Posted on Aug 20, 2024 9:22 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 21, 2024 1:32 AM

@etresoft


I think it's the issue with the terminal. It beeps a couple of times when I paste a big chunk of data.


I can run

base64 <<<"very long text goes here"


fine. It supplies the line on the standard input to the base64 command.


The issue happens when I paste.

11 replies

Aug 20, 2024 10:33 AM in response to gasan48

It's probably a problem with that command. Tools that expect user input typically don't expect an unlimited stream of data. 1024 is a reasonable limit in such cases.


See if the tool has an option to read data from standard input. Then, you can use the "pbpaste" command with a pipe to feed the contents of your clipboard as standard input.

Aug 20, 2024 9:35 AM in response to gasan48

gasan48 wrote:

Hello,

In terminal I run a command that waits for a user input, for example `base64`. I paste the text, but I can only paste up to 1024 symbols. Where is this limit set and how I can increase it?

Thanks.


Not sure I get it...


if this is scroll back limit you can change that is Settings...

Limit the number of scrollback rows in Terminal on Mac - Apple Support



I do see quite a bit of base64 Q&A:

https://www.google.com/search?client=firefox-b-1-d&q=apple+kb+base64+buffer+size+in+terminal


Aug 21, 2024 4:34 AM in response to gasan48

Just use the example I provided. Simpler to deal with and does not bump up against potential Terminal command-line length issues.


Anything that you paste from the clipboard using ^v must be deliberately enclosed in double quotes when using the <<< input operator — but why deal with the horrible mess that creates in the Terminal window?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal input buffer size

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.