From owner-freebsd-questions@FreeBSD.ORG Wed Aug 17 20:14:10 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAF1916A41F for ; Wed, 17 Aug 2005 20:14:10 +0000 (GMT) (envelope-from jdyke@azimainc.com) Received: from extgw01.msys.intellispace.net (extgw01.msys.intellispace.net [160.79.150.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DEF443D45 for ; Wed, 17 Aug 2005 20:14:08 +0000 (GMT) (envelope-from jdyke@azimainc.com) Received: from malone.intellispace.net (malone.intellispace.net [160.79.145.141]) by extgw01.msys.intellispace.net (Postfix) with ESMTP id 01E073175E; Wed, 17 Aug 2005 16:13:39 -0400 (EDT) Received: from [192.168.2.45] (66.9.108.98) by malone.intellispace.net (5.1.053) id 42FCD2DC001CC112; Wed, 17 Aug 2005 16:10:16 -0400 Message-ID: <43039A20.7030803@azimainc.com> Date: Wed, 17 Aug 2005 20:12:16 +0000 From: jdyke Organization: Azima Inc. User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jorge Mario G. Mazo" References: <20050817195522.28381.qmail@web50101.mail.yahoo.com> In-Reply-To: <20050817195522.28381.qmail@web50101.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: how to know the file system type [programming] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jdyke@azimainc.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 20:14:11 -0000 Jorge Mario G. Mazo wrote: > hi there > I've been looking for a way to check the fs type > I need to do something like this > > if NTFS do this > if msdis do that > if ufs2 do that > if ext2 do this other stuff not sure if this is what your looking for, but there are likely a million ways, one being in bash $ fs_to_check=/dev/ad4s1g $ fstype=`grep $fs_to_check /etc/fstab | awk '{ print $3 }'` $ echo $fstype ufs $ could be similarly scripted > > thanks in advance > > > ================================================================= > Either write things worth reading, Or do things worth the writing. > -Benjamin Franklin > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ¡gratis! > Regístrate ya - http://correo.espanol.yahoo.com/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >