From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Finally got a SSD drive to put my OS on
Date: Thu, 20 Apr 2023 04:29:59 -0500 [thread overview]
Message-ID: <0b6cf97a-d7d4-fad4-d365-8e4a96adb34c@gmail.com> (raw)
In-Reply-To: <ZED9PzlgfVhH2R0k@moby>
Frank Steinmetzger wrote:
> Am Wed, Apr 19, 2023 at 06:32:45PM -0500 schrieb Dale:
>> Frank Steinmetzger wrote:
>>> <<<SNIP>>>
>>>
>>> When formatting file systems, I usually lower the number of inodes from the
>>> default value to gain storage space. The default is one inode per 16 kB of
>>> FS size, which gives you 60 million inodes per TB. In practice, even one
>>> million per TB would be overkill in a use case like Dale’s media storage.¹
>>> Removing 59 million inodes × 256 bytes ≈ 15 GB of net space for each TB, not
>>> counting extra control metadata and ext4 redundancies.
>> If I ever rearrange my
>> drives again and can change the file system, I may reduce the inodes at
>> least on the ones I only have large files on. Still tho, given I use
>> LVM and all, maybe that isn't a great idea. As I add drives with LVM, I
>> assume it increases the inodes as well.
> I remember from yesterday that the manpage says that inodes are added
> according to the bytes-per-inode value.
>
>> I wonder. Is there a way to find out the smallest size file in a
>> directory or sub directory, largest files, then maybe a average file
>> size???
> The 20 smallest:
> `find -type f -print0 | xargs -0 stat -c '%s %n' | sort -n | head -n 20`
>
> The 20 largest: either use tail instead of head or reverse sorting with -r.
> You can also first pipe the output of stat into a file so you can sort and
> analyse the list more efficiently, including calculating averages.
When I first run this while in / itself, it occurred to me that it
doesn't specify what directory. I thought maybe changing to the
directory I want it to look at would work but get this:
root@fireball /home/dale/Desktop/Crypt # `find -type f -print0 | xargs
-0 stat -c '%s %n' | sort -n | head -n 20`
-bash: 2: command not found
root@fireball /home/dale/Desktop/Crypt #
It works if I'm in the / directory but not when I'm cd'd to the
directory I want to know about. I don't see a spot to change it. Ideas.
>> I thought about du but given the number of files I have here,
>> it would be a really HUGE list of files. Could take hours or more too.
> I use a “cache” of text files with file listings of all my external drives.
> This allows me to glance over my entire data storage without having to plug
> in any drive. It uses tree underneath to get the list:
>
> `tree -afx -DFins --dirsfirst --du --timefmt "%Y-%m-%d %T"`
>
> This gives me a list of all directories and files, with their full path,
> date and size information and accumulated directory size in a concise
> format. Add -pug to also include permissions.
>
Save this for later use. ;-)
Dale
:-) :-)
next prev parent reply other threads:[~2023-04-20 9:30 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 22:47 [gentoo-user] Finally got a SSD drive to put my OS on Dale
2023-04-15 23:24 ` Mark Knecht
2023-04-15 23:44 ` thelma
2023-04-16 1:47 ` William Kenworthy
2023-04-16 7:18 ` Peter Humphrey
2023-04-16 8:43 ` William Kenworthy
2023-04-16 15:08 ` Mark Knecht
2023-04-16 15:29 ` Dale
2023-04-16 16:10 ` Mark Knecht
2023-04-16 16:54 ` Dale
2023-04-16 18:14 ` Mark Knecht
2023-04-16 18:53 ` Dale
2023-04-16 19:30 ` Mark Knecht
2023-04-16 22:26 ` Dale
2023-04-16 23:16 ` Frank Steinmetzger
2023-04-17 1:14 ` Dale
2023-04-17 9:40 ` Wols Lists
2023-04-17 17:45 ` Mark Knecht
2023-04-18 0:35 ` Dale
2023-04-18 8:03 ` Frank Steinmetzger
2023-10-07 7:22 ` Dale
2023-04-16 17:46 ` Jorge Almeida
2023-04-16 18:07 ` Frank Steinmetzger
2023-04-16 20:22 ` Mark Knecht
2023-04-16 22:17 ` Frank Steinmetzger
2023-04-17 0:34 ` Mark Knecht
2023-04-18 14:52 ` [gentoo-user] " Nikos Chantziaras
2023-04-18 15:05 ` Dale
2023-04-18 15:36 ` Nikos Chantziaras
2023-04-18 20:01 ` Dale
2023-04-18 20:53 ` Wol
2023-04-18 22:13 ` Frank Steinmetzger
2023-04-18 23:08 ` Wols Lists
2023-04-19 1:15 ` Dale
2023-04-18 20:57 ` Mark Knecht
2023-04-18 21:15 ` Dale
2023-04-18 21:25 ` Mark Knecht
2023-04-19 1:36 ` Dale
2023-04-18 22:18 ` Frank Steinmetzger
2023-04-18 22:41 ` Frank Steinmetzger
2023-04-19 1:45 ` Dale
2023-04-19 8:00 ` Nikos Chantziaras
2023-04-19 9:42 ` Dale
2023-04-19 10:34 ` Peter Humphrey
2023-04-19 17:14 ` Mark Knecht
2023-04-19 17:59 ` Dale
2023-04-19 18:13 ` Mark Knecht
2023-04-19 19:26 ` Dale
2023-04-19 19:38 ` Nikos Chantziaras
2023-04-19 20:00 ` Mark Knecht
2023-04-19 22:13 ` Frank Steinmetzger
2023-04-19 23:32 ` Dale
2023-04-20 1:09 ` Mark Knecht
2023-04-20 4:23 ` Dale
2023-04-20 4:41 ` eric
2023-04-20 9:48 ` Dale
2023-04-20 23:02 ` Wol
2023-04-20 8:55 ` Frank Steinmetzger
2023-04-20 8:52 ` Frank Steinmetzger
2023-04-20 9:29 ` Dale [this message]
2023-04-20 10:08 ` Peter Humphrey
2023-04-20 10:59 ` Dale
2023-04-20 13:23 ` Nikos Chantziaras
2023-04-20 12:23 ` Frank Steinmetzger
2023-04-20 9:46 ` Peter Humphrey
2023-04-20 9:49 ` Dale
2023-04-18 17:52 ` Mark Knecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b6cf97a-d7d4-fad4-d365-8e4a96adb34c@gmail.com \
--to=rdalek1967@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox