How to find the disk space left for a file on Linux

How to find the disk space left for a file on Linux? For example, a program may append data to a file:

/mnt/logs/app-log.log

How to find which partition the app-log.log is on and how much disk space left on that partition?

asked Dec 5, 2013 by anonymous

1 Answer

 
Best answer

Use this command:

$ df -B1 /mnt/logs/app-log.log | tail -1 | cut -d' ' -f4

It will displays the available disk space in bytes.

answered Dec 5, 2013 by anonymous
selected Dec 5, 2013

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...