DEV Community

jzfrank
jzfrank

Posted on

Linux Check file size

For directory

du -sh directory_name
Enter fullscreen mode Exit fullscreen mode

list size of specific directory

du -sh *
Enter fullscreen mode Exit fullscreen mode

list current directory's files and directories sizes.

For files

ls -lh
Enter fullscreen mode Exit fullscreen mode

This approach doesn't seem work quit well for directories though.

Top comments (0)