LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2003, 04:49 PM   #1
MadMonkey
LQ Newbie
 
Registered: Aug 2003
Location: USA
Distribution: slack 9
Posts: 12

Rep: Reputation: 0
help! running out of space!


i have a silly newbie question, hope y'all don't mind....

i have 6Gb dedicated to my / partition, and another 6 for /usr. when i recently checked df, it said this:

bash-2.05b# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdb5 5952252 5307104 337908 95% /
/dev/hdb1 101089 7050 88820 8% /boot
/dev/hdb6 5952252 2328772 3316240 42% /usr
/dev/hdb2 15351160 4342200 11008960 29% /mnt/files
/dev/hda1 8899296 3681104 5218192 42% /mnt/windows


so my / partition is almost full! i don't know why this is, since i've only been running this installation for about a week and a half! the only thing i can think of is that i stored my files under /archive for a while while creating hdb2 and formating it to vfat. i deleted the partition though with rmdir. does anyone know how i can see the size of each directory on / ? is there some way i can figure out what's taking up all that space??

thanks guys,
 
Old 09-01-2003, 05:21 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Well since you didn't create a separate partition for /tmp and /var, it could be your temporary files and maybe you log files that are consuming your available space in your / directory.

I would start there first to see about freeing up space.
 
Old 09-01-2003, 05:27 PM   #3
MadMonkey
LQ Newbie
 
Registered: Aug 2003
Location: USA
Distribution: slack 9
Posts: 12

Original Poster
Rep: Reputation: 0
when i type ls -lk at / i get the following:

total 109
drwxr-xr-x 2 root root 4096 Aug 28 21:35 bin
drwxr-xr-x 3 root root 1024 Aug 23 18:30 boot
drwxr-xr-x 15 root root 40960 Aug 29 23:42 dev
drwxr-xr-x 38 root root 4096 Aug 31 00:54 etc
drwxr-xr-x 2 root root 4096 Aug 26 03:01 fonts
drwxr-xr-x 9 520 526 4096 Aug 26 02:49 freetype-2.1.4
drwxr-xr-x 5 root root 4096 Aug 27 02:03 home
drwxr-xr-x 5 root root 4096 Jun 26 22:00 lib
drwx------ 2 root root 16384 Aug 23 12:17 lost+found
drwxr-xr-x 8 root root 4096 Aug 23 18:16 mnt
drwxr-xr-x 5 root root 4096 Aug 28 22:05 opt
dr-xr-xr-x 99 root root 0 Aug 29 19:42 proc
drwx--x--- 25 root root 4096 Aug 31 17:59 root
drwxr-xr-x 2 root root 4096 Aug 28 21:35 sbin
drwxrwxrwt 18 root root 4096 Sep 1 18:18 tmp
drwxr-xr-x 20 root root 4096 Mar 2 2003 usr
drwxr-xr-x 15 root root 4096 Apr 19 00:38 var

what i can't understand is why almost every entry would be 4096 kilobytes?? that must be something other than the size of the file, in which case how can i display the size?

thanks,
 
Old 09-01-2003, 05:31 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
The 4096 your seeing is the block size your hard drive is partitioned and formatted as. Each file will take up 4096 of space as this is the size of the inodes and such. So when your using that command to view the size of a directory, its always going to show you the inode size.

Try using the du command like: du -h /tmp/* to get a more accurate listing of the size of the files in a certain directory, etc.
 
Old 09-01-2003, 05:38 PM   #5
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
What's that in human readable form?

df -h

You might want to move /var over to the /usr partition as you have lots of room left there.

Do this in linux single

# Move directories around
Make directories for the destination mount point.
Code:
[root@tinwhistle root]# mkdir /mnt/destination
Mount your os partitions that you want to copy the directory to on /mnt/destination
Make a directory /mnt/destination/var

Now, cd to /var and pipe it over with tar
Code:
[root@tinwhistle root]# cd /var
[root@tinwhistle source]# tar cf - . | (cd /mnt/destinationvar && tar xBfp -)
Now, umount /mnt/destination and make sure you now have a /usr/var directory with the contents of /var in that directory

Now delete the directory /var and make a symbolic link to the new var.

ln -s /usr/var var

Reboot and you should now have more room in /

Last edited by fancypiper; 09-01-2003 at 05:39 PM.
 
Old 09-01-2003, 06:00 PM   #6
MadMonkey
LQ Newbie
 
Registered: Aug 2003
Location: USA
Distribution: slack 9
Posts: 12

Original Poster
Rep: Reputation: 0
i'm kinda confused. check this out:

bash-2.05b# du -hs /*
4.9M /bin
2.9M /boot
348k /dev
19M /etc
9.8M /fonts
11M /freetype-2.1.4
253M /home
20M /lib
16k /lost+found
7.7G /mnt
250M /opt
du: `/proc/21582/fd/4': No such file or directory
18k /proc
18M /root
5.7M /sbin
13M /tmp
2.2G /usr
312M /var


those are the sizes of all subdirectories of / (including /usr /mnt and /boot which don't count). is it just my math or is that still under 6 gigs?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running out of space donkyboy Mandriva 9 01-04-2005 08:34 PM
Running out of space? reidsb Linux - Newbie 4 11-28-2003 04:01 PM
Running out of disk space ann_tulip18 Linux - Newbie 33 07-10-2003 11:45 PM
running out of space on /usr namradi Linux - Newbie 2 05-27-2003 02:08 PM
swap space is running out ... yahelb Linux - General 4 03-14-2003 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration