Skip to content

A command line utility to find how big a file or directory is

License

Notifications You must be signed in to change notification settings

masoncfrancis/filesize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filesize

A command-line utility to get the size of a file or directory, written in Go

Getting Started

Installation/Updating

UNIX-like Operating Systems

Run the following command to install or update an existing installation on UNIX-like operating systems:

curl -s https://filesize.i.masonfrancis.net/! | sudo bash

You're right to be wary of running random bash scripts on your system, so if you want to read through the install script before you run it, you can see it at https://filesize.i.masonfrancis.net/!?type=script. It's not very long. Basically the script checks what OS and architecture you're using, downloads the appropriate binary, and installs it to a directory, most likely /usr/local/bin. If you get an error saying that the directory doesn't exist, you can create it with sudo mkdir -p [the directory path]. If you do that, install successfully, and try to run filesize and it says it can't be found, you might need to add that directory to your PATH variable. Look up how to do that if you're not sure.

Windows

If you are using Windows, you'll need to download the executable for your operating system on the Releases page. If you want it to always be accessible via the command line or PowerShell, make sure to put it somewhere in your PATH variable (or add the directory it's in to your PATH variable). Look up how to do that if you're not sure.

Usage

filesize [flag] <file or directory>

Flags

  • -l: List sizes of files within the first level of the directory
  • -L: List sizes of all subdirectories
  • -h: Show detailed usage information
  • -v: Show the version of the program

Credits

About

A command line utility to find how big a file or directory is

Resources

License

Stars

Watchers

Forks

Packages

No packages published