Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to copy a a heavy setup file(Binaries of a software) 3.4 GB from windows to Linux machine. But I am scared as I dont know if I will copy the file under /home drive it may get full, and space issues can occur, I checked the space using below command :

root@tsscpl22dev ~ # du -h /home
8.0K    /home

Could anyone please help and let me know how can I check the space and copy it to the right directory.

share|improve this question

migrated from stackoverflow.com Dec 27 '12 at 13:47

This question came from our site for professional and enthusiast programmers.

    
Result of : df -h /home Filesystem Size Used Avail Use% Mounted on /dev/mapper/ROOTVG-rootlv 5.0G 3.7G 1.1G 79% / It is showing 1.1G available that means I cant use it right? –  Richa Dec 27 '12 at 13:59

3 Answers 3

du is not what you want. From the manpage:

NAME
    du - estimate file space usage

You want df -h /home. Even if your /home isn't in a separate partition, it should work.

Or better, just use df to see all the file systems that are available and choose one that has enough space.

share|improve this answer

Using du -sh /home would be fine.

share|improve this answer
    
Result of : df -h /home Filesystem Size Used Avail Use% Mounted on /dev/mapper/ROOTVG-rootlv 5.0G 3.7G 1.1G 79% / It is showing 1.1G available that means I cant use it right? –  Richa Dec 27 '12 at 13:54
    
Right. And as @cdhowie said, df or df -h will display a list of every mounted volume, you may choose one from the list which have enough space left. –  Rox Dorentus Dec 27 '12 at 14:17

Don't use du, use df instead. df -h will show you human-readable figures for the capacity and used/free space of every mounted volume. If you have no separate /home volume then the / volume is likely to be where your files under /home are stored.

share|improve this answer
    
Result of : df -h /home Filesystem Size Used Avail Use% Mounted on /dev/mapper/ROOTVG-rootlv 5.0G 3.7G 1.1G 79% / It is showing 1.1G available that means I cant use it right? –  Richa Dec 27 '12 at 13:55
    
Could you suggest me some other path other than /home that I can check, sorry but I am new to Linux –  Richa Dec 27 '12 at 13:56
    
@Richa run df (without arguments) and see where you can put the file. –  Renan Dec 27 '12 at 14:02
    
Thanks Renan,Below is the one that shows the maximum space available, 19G so that means I can copy a file of 4GB right? i ran df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/APPVG-hp 20G 173M 19G 1% /opt/HP –  Richa Dec 27 '12 at 14:05
1  
@Richa Correct. / has no room for the file(s), but /opt/HP does. –  cdhowie Dec 27 '12 at 14:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.