coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 (resend)] tee: Add -q, --quiet, --silent option, to not wr


From: Alejandro Colomar (man-pages)
Subject: Re: [PATCH v3 (resend)] tee: Add -q, --quiet, --silent option, to not write to stdout
Date: Wed, 27 Jan 2021 18:30:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/27/21 6:00 PM, L A Walsh <coreutils@tlinx.org> wrote:
On 2021/01/26 05:57, Rodney W. Grimes wrote:

So, I would remove '-i, --input-stream'.  (And if you think it's
missing, maybe write a program to read from any FD and write to stdout.)

Its name is cat(1)
cat /dev/fd/# >outputfile
----
     Except the problem, which I've run into before, is to
have such a command executable by 'root' and output by 'root',
Have you ever tried to drop your file caches?
need to echo "3" to /proc/sys/vm/drop_caches.  Except if you are
a normal user, you need to elevate to root first, but what you
suggest won't work:

    echo "3" | sudo cat >/proc/sys/vm/dropcaches
-bash: /proc/sys/vm/drop_caches: Permission denied

Cat isn't writing the file -- bash is.  I ended up using
dd at the time, but tq seems more efficient:

echo "3" |sudo tq /proc/sys/vm/dropcaches

(which does work).

If I understood correctly, Rodney meant:

sink -i4 outputfile
==
cat /dev/fd/4 | sink outputfile

minimizing the concerns of 'sink' ('sink' as proposed by Berny, or 'tq', as L A Walsh named it) to just writing, and read only from stdin.


Cheers,

Alex


--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]