How to prune root directory FreeBSD 6.2?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to prune root directory FreeBSD 6.2?
# 1  
Old 01-29-2008
How to prune root directory FreeBSD 6.2?

Hello,

Somehow my FreeBSD server has filled up its root directory. FILELIGHT shows no free space. I have already gotten rid of /boot/GENERIC and /BOOT/kernel.old (thinking these were really in / and not just linked) but that did no good. I'm too much of a noob to know what to prune out of my / directory (which is only 512MB, but I don't want to have to try resizing it, since I see what that involves). Any help MUCH APPRECIATED!

BTW I can no longer boot in single user mode (I assume this is because I removed /boot/GENERIC?

Thanks,

Leon

PS My slices are /, /var, /tmp and /usr

My / directory listing shows as follows:

$ ls -al
total 333
drwxr-xr-x 24 root wheel 1024 Jan 29 11:33 .
drwxr-xr-x 24 root wheel 1024 Jan 29 11:33 ..
-rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc
drwx------ 2 root wheel 512 Oct 23 07:32 .mozilla
-rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile
drwxr-xr-x 2 root wheel 1024 Oct 23 07:11 bin
drwxr-xr-x 6 root wheel 512 Jan 29 11:55 boot
drwxr-xr-x 2 root wheel 512 Oct 23 07:11 cdrom
drwxr-xr-x 2 root wheel 512 Dec 19 11:13 command
lrwxr-xr-x 1 root wheel 10 Oct 23 07:15 compat -> usr/compat
dr-xr-xr-x 4 root wheel 512 Dec 31 1969 dev
drwxr-xr-x 2 root wheel 512 Oct 23 07:11 dist
-rw------- 1 root wheel 4096 Jan 17 09:44 entropy
drwxr-xr-x 18 root wheel 2560 Jan 29 09:32 etc
lrwxrwxrwx 1 root wheel 8 Oct 23 07:47 home -> usr/home
-rw------- 1 root wheel 262144 Jan 29 11:25 kdm-bin.core
drwxr-xr-x 3 root wheel 1024 Oct 23 07:11 lib
drwxr-xr-x 2 root wheel 512 Oct 23 07:11 libexec
drwxr-xr-x 2 root wheel 512 Jan 12 2007 media
drwxr-xr-x 13 root wheel 512 Jan 7 10:54 mnt
drwxr-xr-t 3 root wheel 512 Dec 19 10:28 package
dr-xr-xr-x 2 root wheel 512 Jan 12 2007 proc
drwxrwxrwx 40 root wheel 1536 Jan 7 11:16 product
drwxr-xr-x 2 root wheel 2560 Oct 23 07:11 rescue
drwxr-xr-x 12 root wheel 1024 Jan 29 11:56 root
drwxr-xr-x 2 root wheel 2560 Oct 23 07:11 sbin
drwxr-xr-x 2 root wheel 512 Dec 19 11:13 service
lrwxrwxrwx 1 root wheel 11 Oct 23 07:11 sys -> usr/src/sys
drwxrwxrwt 41 root wheel 1024 Jan 29 11:55 tmp
drwxr-xr-x 23 root wheel 512 Jan 23 09:14 usr
drwxr-xr-x 27 root wheel 512 Jan 29 06:51 var

Last edited by lmalinofsky; 01-29-2008 at 01:44 PM..
# 2  
Old 01-29-2008
That core file would be a good place to start (kdm-bin.core).
Otherwise:
Code:
du -skd * / | sort -n

Then look at things with large sizes. If you wish, you can pick a big directory and run the du command again (replace / with the dir name) to see what's overly large in there.

Also, /product looks suspicious, it's publicly writable (incredibly bad) and not on it's own partition. I'd bet your problem is in there somewhere.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. UNIX for Dummies Questions & Answers

Removing directory with leading hyphen from root directory

I know that this basic question has been asked many times and solutions all over the internet, but none of the are working for me. I have a directory in the root directory, named "-p". # ls -l / total 198 <snip> drwxr-xr-x 4 root root 4096 Dec 3 14:18 opt drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: edstevens
2 Replies

3. Solaris

root directory is full

root directory in server / is full 100% , i already tried to delete any core file , log , .. still files under /proc directory take more than 4 G.. what you advice please i don't want to format the server and install again and re partition , i tried the FORMAT tools ! but it seems i cant do... (5 Replies)
Discussion started by: moata_u
5 Replies

4. Web Development

What is a root directory

Hey guys. I am learning PHP and I just started a few minutes ago and it said after you maked your first hello world php file to upload it to your root directory in your webserver. What is your root directory? Is it where like all the appearance of the website is held (like what we see when we enter... (6 Replies)
Discussion started by: orszhak
6 Replies

5. Ubuntu

Root directory not available!

I am using Ubuntu 10.10. I want to access root home directory (~) through GUI and want access to its content. I login from administrator who is the only login user and have all rights for it. I can access the content through terminal but can't do it through GUI. Remedy my problem (5 Replies)
Discussion started by: nixhead
5 Replies

6. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

7. UNIX for Advanced & Expert Users

Damaged root directory ..

With the cpio command of a Unix File System for error I have replaced the directory “.. “ (when you give the command “ls -la” under root you see at the beginning the hidden directory “. “ followed by a hidden file who is called “..” ) I have the copy on a cartridge of the whole file system, but... (3 Replies)
Discussion started by: SISQUEZ
3 Replies

8. UNIX for Dummies Questions & Answers

root directory

root directory is going out of space. how can i free up memory by deleting unwanted file. which files are safe to remove.i checked tmp dir. also. but no files. thanks (1 Reply)
Discussion started by: ajantha
1 Replies

9. UNIX for Advanced & Expert Users

What change in freeBSD OS to allow root logging using ssh?

Hi everybody, ] I would like to ask just simpe and short question. I am using freeBSD 6.0 and Debian Sarge. From Debian console I can log as root using ssh to bsd mashine but not vice versa. When I say in bsd console su I got sorry output, it does not allow me to su to root when I am logged... (5 Replies)
Discussion started by: 100days
5 Replies

10. Shell Programming and Scripting

scripts in root directory

Is it good practice to leave scripts in the root directory? if no, why is it not? (1 Reply)
Discussion started by: stephen adebayo
1 Replies
Login or Register to Ask a Question