Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linux df -k command

Status
Not open for further replies.

pzxkys

IS-IT--Management
Jul 18, 2000
24
US
Df -k produces the following output for /home & /:

[pzxkys@default log]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda6 505605 446783 32718 94% /
/dev/sda5 4386344 378356 3785088 10% /home


When I moved a 337480131 byte file out of /opt/apache/logs (it was the access_log) to /home/<my subdir> it appeared to move it properly. The available /home space changed as expected. The available / space did not change (or it may have changed slightly) as expected. What's going on?

Thanks.
 
So you moved a 300mb file from sda6 (/) to sda5 (/home).
sda6 is 500mb, with 30mb available.
sda5 is 4gb, over 3.7gb available.

I don't see how you could have moved a 300mb file off sda6, and not have freed up 300mb, but rather 30mb? Sounds like its just full, and reporting space incorrectly (unless my math is off, I prefer df -h).

Where is /var/log? That typically has tons of logs you can purge.



Matt J.
 
It turns out that the df -k command is apparently working properly. The problem was that I rm'd the access_log file and should have cat /dev/null'd it instead. Apache didn't get it that the file was rm'd so it hung onto it ... somewhere in the system ... and the / partition numbers reflected the problem. Once I restarted apache the df -k output was fixed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top