From owner-freebsd-questions@freebsd.org Tue Jan 26 11:36:33 2016 Return-Path: Delivered-To: freebsd-questions@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 CF0DDA6E207 for ; Tue, 26 Jan 2016 11:36:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92A4ED2 for ; Tue, 26 Jan 2016 11:36:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-101-208.dynamic.qsc.de [92.195.101.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 7880F3CDE6; Tue, 26 Jan 2016 12:36:31 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u0QBaU8u004514; Tue, 26 Jan 2016 12:36:30 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 26 Jan 2016 12:36:30 +0100 From: Polytropon To: Arthur Chance Cc: Murk Fletcher , FreeBSD Questions Subject: Re: What's taking up all my disk space? Message-Id: <20160126123630.13113f67.freebsd@edvax.de> In-Reply-To: <56A7587C.8070003@qeng-ho.org> References: <56A7587C.8070003@qeng-ho.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 11:36:33 -0000 On Tue, 26 Jan 2016 11:29:00 +0000, Arthur Chance wrote: > On 26/01/2016 10:23, Anton Sayetsky wrote: > > 26 янв. 2016 г. 12:21 пользователь "Murk Fletcher" > > написал: > >> > >> Hi! > >> > >> Woke up to a nasty surprise this morning: > >> > >> /: write failed, filesystem is full > >> # df -h > >> Filesystem Size Used Avail Capacity Mounted on > >> /dev/gpt/rootfs 38G 35G -7.4M 100% / > >> devfs 1.0K 1.0K 0B 100% /dev > >> fdescfs 1.0K 1.0K 0B 100% /dev/fd > >> linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc > >> > >> I have no idea why this is because I'm only using my FreeBSD VPS to run a > >> small Rails app in `/usr/home/`: > >> > >> # du -sh /usr/home > >> 8.6G /usr/home > >> # du -sh /usr/ > >> 12G /usr/ > >> # du -sh / > >> 34G / > >> > >> Maybe there's a way to use `du` to show all files larger than 1GB and then > >> pass it on to some other command to sort them by size? > > Try "du -sh /*" first. > > There aren't so many sub-directories in / that it's difficult to spot > the largest but > > du -sh /* | sort -rh > > will order the list from largest to smallest. Very useful (possibly with > head added to the pipeline) if you've got a lot of subdirectories. And in case you want a more detailed list: # ls -laFG -D "%Y-%m-%d %H:%M:%S" / | sort -r -g +4 | less The largest files will be on top. Use /var or /tmp instead of / when you want to have a listing for a specific subtree. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...