Michael Lazin via plug on 22 Feb 2022 18:49:19 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] du,sed,sql,free tools


I used to deal with space issues on shared hosting servers and ran "du -sh ./*" in the root directory to find the biggest directory, descend into it and run it again until I found the files that hog space. I showed this to a Mac user once and it blew their mind, it does work in MacOS and it does not have any decent utility to do this like Windows does.  I realize this is slightly off-topic but I find this really handy on Linux and MacOS. 

Michael Lazin

.. τὸ γὰρ αὐτὸ νοεῖν ἐστίν τε καὶ εἶναι.


On Tue, Feb 22, 2022 at 8:32 PM JP Vossen via plug <plug@lists.phillylinux.org> wrote:
On 2/22/22 17:22, PaulNM via plug wrote:
> Oh wow, never knew about sort's -h and -k options. I've always had to
> use du without -h if I wanted sort's output to be usable.

That is nice.  Another neat one is `sort -V | --version-sort` which is a "natural sort of (version) numbers within text" but which also Just Works for IP addresses!  Note this is GNU `sort`...


> Anyone using du may also want to take a look at ncdu. Ncdu is a small,
> lightweight ncurses version of du. The screen is already sorted, you can
> navigate in/out of folders, and the display includes a simple bar chart
> (of #'s) to show items relative size to each other. You can switch the
> chart display between chart, percentage, both, and none via the "g" key.
> You can also delete stuff from within ncdu.

+10 for `ncdu`.

Later,
JP
--  -------------------------------------------------------------------
JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug