Rich Freeman via plug on 24 Feb 2022 13:00:50 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] du,sed,sql,free tools |
On Tue, Feb 22, 2022 at 9:49 PM Michael Lazin via plug <plug@lists.phillylinux.org> wrote: > > 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. > Since we've gotten du -sh, and we've gotten sort, I'll go ahead and just mention that sort has a -h parameter that allows it to sort the kinds of output that du -sh produces. Ie 15M is smaller than 15G which is smaller than 15T. I haven't used ncdu, but I have used similar sorts of x11 applications like kdirstat, baobab, and I'm sure there are many others. If you're on windows then windirstat is similar. Some of these applications are prone to lock up if you go clicking on some tiny cache file buried in giant directories. It is nice to hear that there is a command-line equivalent. If you want something a bit like ncdu, but for browsing git repos, then look up tig, which is git spelled backwards. It lets you do things like interactively explore commit histories, and you can also pipe git output into it and it tends to "do the right thing." It is also ncurses-based. -- Rich ___________________________________________________________________________ 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