From owner-freebsd-stable@freebsd.org Thu Mar 10 18:12:55 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACFC5ACAAD5 for ; Thu, 10 Mar 2016 18:12:55 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480D7B76 for ; Thu, 10 Mar 2016 18:12:55 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id p65so39708618wmp.0 for ; Thu, 10 Mar 2016 10:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=NxM8JUDOLrnnSB1ORzZuGilDj9e21XN6HFL/tQUn0TY=; b=dIjKhT3afPp7ClC1g8HGMZLlsIOeG7pImSyLXlM8LPv++Ht4SvlouAxj56e/wM2FkM wvcIqESAfoRXWLtPZjeNnRa1yUTkQmmVgtoBrwJJzZgi9Q0C1lOppcuSy8YqWPsF0Upf PMwqR+Uwq3ewTumYOMN47dAAcSI377twZyD+C/mn7AJVFF3uoy2FwEAijgMDHqo2Zx9O e95s5IS2y+z2DNDUNvTXvlvywDYntUH9Jm8l8VIfG1tadd85WZEdawzKwzS/ZLrq8FCI S6jYp7UGurESpzEkIhOcz57eOILZR+bmIVhag5xltf7OW6S8A0rIzujq9FcVGty8BAps IFaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=NxM8JUDOLrnnSB1ORzZuGilDj9e21XN6HFL/tQUn0TY=; b=Yy3NW0nHMpKRlUMVKZxN6YiSObNldKPOXooZT6j9JS0t7KeVT89VggmObaUBNJXwW0 oY5YtJtRfccrt/umSuacqmHVnHJaF7a1QcsoBDbZZOytb36ZJ9nTFgMWOe+GDhgwN/zq 4a6gB5q7IiqIxjcf6q46fqwYfMTBXqxzY5aZAQ+XHbiUYtr++ml3PvZSNcTVBwoUTUwi QWhZsVkCPCRAdJEhe85ePQ9wFQqbpJQZDJdGaOb3x7nuAw+jwj8vdMCigo9PdttqoI3q BtQ0auVmSygmJ04ykLowLaJV1Up51LFkbSVcyM0W3VMsRJjIxyRLP8TpOJr/AnHOLVPV PE7g== X-Gm-Message-State: AD7BkJIZHKklZfNOgVlwFS8CTU4MYH0HpaJMpGN+Hu+UbtQwoz5jq8e57uOFwIWb+HOFrQ== X-Received: by 10.28.214.6 with SMTP id n6mr5582573wmg.49.1457633573820; Thu, 10 Mar 2016 10:12:53 -0800 (PST) Received: from Johans-MacBook-Air.local (92-111-79-242.static.chello.nl. [92.111.79.242]) by smtp.googlemail.com with ESMTPSA id i186sm3977762wmf.1.2016.03.10.10.12.52 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Mar 2016 10:12:53 -0800 (PST) To: freebsd-stable@freebsd.org From: Johan Hendriks Subject: output to file different than console. (ssh and zfs ) Message-ID: <56E1B925.5060105@gmail.com> Date: Thu, 10 Mar 2016 19:12:53 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 18:12:55 -0000 Hello all. I use a script to get a list of snapshots from a remote machine. If I run it on the console it gives me the following. root@storage1:/ # ssh root@storage2.server.mydomain.com /sbin/zfs list -H -o name -t snapshot | grep 15min_ | sort storage/home/datadir1@15min_2016-03-09_22.20.00--1h storage/home/datadir2@15min_2016-03-09_22.20.00--1h storage/home/datadir3@15min_2016-03-09_22.20.00--1h storage/home/datadir4@15min_2016-03-09_22.20.00--1h root@storage1:/ # As you see the output shows the zfs snapshots of the remote server. I need this to to into a file so I can grep, sed and do other things with it. If I put the output to a file than the name of the remote machine is in that file. ( I see this on my 10.2 machines, not on my 9.x machines.) root@storage1:/ # ssh root@storage2.server.mydomain.com /sbin/zfs list -H -o name -t snapshot | grep 15min_ | sort > /tmp/zfs-remote-snapshot root@storage1:/ # vi /tmp/zfs-remote-snapshot ^[]0;storage2.server.mydomain.com^Gstorage/home/datadir1@15min_2016-03-09_22.20.00--1h storage/home/datadir2@15min_2016-03-09_22.20.00--1h storage/home/datadir3@15min_2016-03-09_22.20.00--1h storage/home/datadir4@15min_2016-03-09_22.20.00--1h I have no idea why the hostname is in the file. Is there an option I should give to ssh or something. Like I said, on FreeBSD 9.x I do not see this. Thanks for your time. regards Johan