0

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.

1
  • 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, 2012 at 13:59

3 Answers 3

3

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.

8
  • 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, 2012 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, 2012 at 13:56
  • @Richa run df (without arguments) and see where you can put the file.
    – Renan
    Dec 27, 2012 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, 2012 at 14:05
  • 1
    @Richa Correct. / has no room for the file(s), but /opt/HP does.
    – cdhowie
    Dec 27, 2012 at 14:12
2

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.

1

Using du -sh /home would be fine.

2
  • 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, 2012 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. Dec 27, 2012 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .