From owner-freebsd-questions Mon Oct 4 13:56:59 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cobalt.novagate.net (cobalt.novagate.net [205.138.138.17]) by hub.freebsd.org (Postfix) with ESMTP id BB9AC14A2D for ; Mon, 4 Oct 1999 13:56:51 -0700 (PDT) (envelope-from xlogan@novagate.net) Received: from cobalt (IDENT:xlogan@cobalt [205.138.138.17]) by cobalt.novagate.net (8.9.2/8.8.7) with SMTP id RAA19824 for ; Mon, 4 Oct 1999 17:06:20 -0400 (EDT) Date: Mon, 4 Oct 1999 17:06:20 -0400 (EDT) From: x@asdf.com X-Sender: xlogan@cobalt.novagate.net To: freebsd-questions@FreeBSD.ORG Subject: recursive cat weirdness Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! A co-worker found something interesting today by accident. He tried it on a FreeBSD 1.2.6 machine, and i just tried it on my 3.3 machine. You make two files that can have as many lines as you want. Just one line of garbage will do. Then you cat file1 file2 > file2 it just hangs and starts eating CPU. Then after you Ctrl C out and check, the file2 has gotten huge (well, at least if you let it run long enough). I tried this on a version of Linux and it wouldn't let me by saying something like "output file is input file". I guess this is not a big deal but if someone wanted to be a jerk they could just make two little files and eat up your disk space and CPU until you noticed it running. -Dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message