From owner-freebsd-questions@FreeBSD.ORG Mon Jan 10 23:14:14 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7823106564A for ; Mon, 10 Jan 2011 23:14:14 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5D90A8FC18 for ; Mon, 10 Jan 2011 23:14:13 +0000 (UTC) Received: by wyf19 with SMTP id 19so20288089wyf.13 for ; Mon, 10 Jan 2011 15:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=OtPEwCegGh7KjXB3TDBtAfZh+OUB04y8UaaihTita7c=; b=gbNReR7YSZY+rpLebAYk27N5egLeFBOqCvwleaERwDDcYsKymVEvKJwLXhnBJLeLBh kZ+xzRe3h+NXt0rfrquUytpuTUAgqMlFvfG0hUFfOrTm0m9JA0NQy9s3fxhiXVTjCY+9 cfRPWqTSvMgJIkD3Kl0SqCj4TqvE3qGeL6cVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fcnDPsJZkOD9X8pzVzHk/NPZE2hhQLigaEnNY1nAIoGBTxBXGxvt8Dye0EMlWBrRSc qj5YrhZuZcaFQltsJF8yBWeKX8LyHCU1CRzMcO8m6pXNCA/lOggzLMBR4EA7bwooTbIN alNmO19aHaK8z5hpXBJhxx1GaeSM9g72AaxDc= MIME-Version: 1.0 Received: by 10.227.146.9 with SMTP id f9mr3266545wbv.209.1294701253146; Mon, 10 Jan 2011 15:14:13 -0800 (PST) Received: by 10.227.20.73 with HTTP; Mon, 10 Jan 2011 15:14:13 -0800 (PST) In-Reply-To: <20110110211331.E12A6106566B@hub.freebsd.org> References: <20110110211331.E12A6106566B@hub.freebsd.org> Date: Mon, 10 Jan 2011 16:14:13 -0700 Message-ID: From: Modulok To: peter@vfemail.net Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: File Listing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 23:14:14 -0000 On 1/10/11, peter@vfemail.net wrote: > > Is there one single-line command I can execute that will list every file in > every directory on my FreeBSD box? I've been fussing with the ls and du > commands, but the output is never quite complete. You might look into the 'tree(1)' command. It's a third party package that can be installed as: # pkg_add -r tree It has lots of flags to list files in various ways. By default it lists all files in a tree-like format like this: tree -a /etc . |-- X11 |-- aliases -> mail/aliases |-- amd.map |-- apmd.conf |-- auth.conf |-- bluetooth | |-- hcsecd.conf | |-- hosts | `-- protocols |-- crontab ... and so on... You can also list files with full paths without indents and such. See man tree after its installed. Another example: tree -aif /etc /etc /etc/X11 /etc/aliases -> mail/aliases /etc/amd.map /etc/apmd.conf /etc/auth.conf /etc/bluetooth /etc/bluetooth/hcsecd.conf /etc/bluetooth/hosts /etc/bluetooth/protocols There's also switches for how to handle symbolic links and staying on one file system, depth limits, file limits, etc. -Modulok-