Tag Info

New answers tagged

6

Many of the compressors take an an environment variable to accept options that cannot be passed on the command line. In your case GZIP_OPT=-9 sort --compress-program=/bin/gzip The same is true for xz with XZ_OPT and bzip2 with BZIP2


1

The problem is that the shell redirection (<) sends the file over the ssh tunnel. And the Java class is expecting not the file, but a string with the "filename" of a local file that will be read with a FileReader. Instead of passing the filename to the FileReader, read from the standard input. InputStreamReader isReader = new ...


-1

The local file, by definition, is on your local machine. The java program is on a remote machine. The remote machine does not know about your local file, and in any production situation probably does not have permission to read it. I can think of three general approaches to this situation: 1) Change your Java program to read from stdin instead of from a ...


3

I don't know anything about Java, but I can show you a proof of concept. Say we have localfile.txt: Here is the local file. and on the remote machine, we have remote.sh: #!/bin/bash cat /dev/stdin Note that the script on the remote machine invokes a program which reads from stdin. Then pass the contents of localfile.txt to your ssh command: ...


5

Answers Definitely not a bug. The parameter which defines the maximum size for one argument is MAX_ARG_STRLEN. There is no documentation for this parameter other than the comments in binfmts.h: /* * These are the maximum length and maximum number of strings passed to the * execve() system call. MAX_ARG_STRLEN is essentially random but serves to * ...


0

In eglibc-2.18/NEWS * ARG_MAX is not anymore constant on Linux. Use sysconf(_SC_ARG_MAX). Implemented by Ulrich Drepper. In eglibc-2.18/debian/patches/kfreebsd/local-sysdeps.diff + case _SC_ARG_MAX: + request[0] = CTL_KERN; + request[1] = KERN_ARGMAX; + if (__sysctl(request, 2, &value, &len, NULL, 0) == -1) + return ARG_MAX; + ...


-1

So @StephaneChazelas rightly corrects me in the comments below - the shell itself does not dictate in any way the maximum argument size permitted by your system, but rather it's set by your kernel. As several others have already said, it seems the kernel limits to 128kb the maximum argument size you can hand to a new process from any other when first ...



Top 50 recent answers are included