List folder size terminal mac os x

I was pointed towards this solution by this cyberciti.

How to Get the Size of a Directory from Command Line

Their solution was very close, but just needed a minor change or two to work on MacOS. In summary, if you wanted to see how to show the largest files under a directory on MacOS, Unix, and Linux systems, I hope this is helpful. By Alvin Alexander.

  • You might also likeā€¦.
  • windows live mesh mac mountain lion.
  • spoof mac os x app?
  • transfer data from pc to mac or mac to pc using ethernet cable?

Last updated: December 23 In the Music folder on my Mac the command and output look like this: So gsort -h. For example, to get a list of files in the current directory, as a single column list, and showing file details, enter: If, as the question detail states, one wants the file list to be ordered by file size, largest file size at the top, then add a capital "S": If your creating and editing files in the current directory often, perhaps because you are in the process of working on a task or project, an alternative combination is: These options, and more, are in the man manual page for the ls command: For example, to fulfill that desired by the original poster of the question, open the file and on a fresh line add: If you do not know how to use nano, first bring up its man ual page by typing man nano The man page will explain how to use nano.

Your Answer

To exit a man page and get back to where you can enter a command, press the key "q". Seema Kadavan Seema Kadavan 1, 9 It doesn't size the contents of the directories like du does. Sign up or log in Sign up using Google.

How to Show Full Path for File in Finder on Mac OS X

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

Getting the Size of a Directory via Command Line

Mail will not be published required. All Rights Reserved. Reproduction without explicit permission is prohibited.

Enter your email address below: Posted by: Joss says: March 9, at 5: Jan Steinman says: March 9, at 6: Walter says: March 9, at 8: Stephen says: March 10, at 1: