(Sep-29-2017, 08:34 PM)nilamo Wrote: Quick, how does the realjust to be safe, instead of running this on my laptop (not even in a VM on it) i fired up an AWS cloud instance (15GB) and ran i there. it is still running but i am not sure what it is doing. bothtail
handle an input stream larger than system memory?yes | tail
I don't know what it would do, but reading all of stdin seems like a bad idea.
yes
and tail
have used up about 4GB each (seems a lot for yes
) but are not growing it's not using any swap space, either. my guess is that the real tail
is counting duplicate lines. if yes
needs that much space, it must be taken up virtually by the library ... in both processes. there seems to be no slowdown.Output:lt1/forums /home/forums 2> ssh ec2-user@2600:1f18:6291:9700:19e2:fac9:a9fb:19d4
Warning: Permanently added '2600:1f18:6291:9700:19e2:fac9:a9fb:19d4' (ECDSA) to the list of known hosts.
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2017.03-release-notes/
[ec2-user@ip-172-31-0-76 ~]$ yes | tail
and in another window and ssh session (not running slow), two commands separated by some time:Output:lt1/forums /home/forums 1> ssh ec2-user@2600:1f18:6291:9700:19e2:fac9:a9fb:19d4
Warning: Permanently added '2600:1f18:6291:9700:19e2:fac9:a9fb:19d4' (ECDSA) to the list of known hosts.
Last login: Sun Oct 1 05:43:55 2017 from 2a02:348:61:5d75::f
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2017.03-release-notes/
[ec2-user@ip-172-31-0-76 ~]$ ps awux|egrep 'yes|tail'|fgrep -v 'grep'
ec2-user 3171 99.9 0.0 4316 708 pts/0 S+ 05:21 24:48 yes
ec2-user 3172 51.2 0.0 4344 732 pts/0 R+ 05:21 12:42 tail
[ec2-user@ip-172-31-0-76 ~]$ ps awux|egrep 'yes|tail'|fgrep -v 'grep'
ec2-user 3171 99.9 0.0 4316 708 pts/0 R+ 05:21 35:21 yes
ec2-user 3172 51.1 0.0 4344 732 pts/0 S+ 05:21 18:06 tail
[ec2-user@ip-172-31-0-76 ~]$
i killed
yes
and tail
output 10 lines of "y" (as expected).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.