LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2009, 08:37 AM   #1
epamuk
Member
 
Registered: May 2007
Posts: 62

Rep: Reputation: 15
Which unnecessary files can i delete in the root folder?


Hi,

I have used Redhat Red Enterprise Linux AS release 4 Update 6. I have a free size problem on the root folder. Root folder Using %92 space. Therefore It have 800 mb free size.

I want to delete unnecessary files in the root folder. Which files can I delete in the root folder?

Example, windows have temp folder. And Windows system admins can delete temp folder files for open free size. Does linux system have any folder as temp?

Which files i must delete in the folder for open free size?

Thanks.

[root@websrv /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVolRoot
9.7G 8.4G 841M 92% /
/dev/sda1 99M 14M 81M 15% /boot
none 3.0G 0 3.0G 0% /dev/shm
/dev/mapper/VolGroup00-LogVolU01
15G 9.9G 4.0G 72% /u01
[root@websrv /]#
 
Old 08-10-2009, 08:49 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
You can use the command du to find where a lot of space is used. Next you can analyze that.

And yes, there is a /tmp directory. The other directory that you might want to look at is /var as it contains a lot of logfiles.
 
Old 08-11-2009, 09:04 AM   #3
epamuk
Member
 
Registered: May 2007
Posts: 62

Original Poster
Rep: Reputation: 15
Hi Wim,

You can see / data status at below. What are you thinking, Which folders havent normal? Which folders have high disk space usage? which folders I must delete?

I need your help.

Thanks.

[root@websrv /]# ls -al
total 210
drwxr-xr-x 28 root root 4096 Apr 30 21:56 .
drwxr-xr-x 28 root root 4096 Apr 30 21:56 ..
-rw-r--r-- 1 root root 0 Apr 30 21:56 .autofsck
drwxr-xr-x 2 root root 4096 Jul 31 2007 .automount
drwxr-xr-x 2 root root 4096 Jan 31 2009 bin
drwxr-xr-x 4 root root 1024 Jan 31 2009 boot
drwxr-xr-x 9 root root 5880 Apr 30 21:57 dev
drwxr-xr-x 113 root root 12288 Aug 10 04:03 etc
drwxr-xr-x 4 oracle oracle 4096 Jan 31 2009 home
drwxr-xr-x 2 root root 4096 Aug 12 2004 initrd
drwxr-xr-x 12 root root 4096 Aug 10 04:03 lib
drwx------ 2 root root 16384 Jan 31 2009 lost+found
drwxr-xr-x 2 root root 4096 Feb 6 2009 media
drwxr-xr-x 2 root root 4096 Aug 8 2007 misc
drwxr-xr-x 2 root root 4096 Aug 12 2004 mnt
drwxr-xr-x 3 root root 4096 Apr 22 09:33 opt
dr-xr-xr-x 771 root root 0 Apr 30 17:55 proc
drwxrwxrwx 2 oracle oinstall 4096 Jul 21 14:44 reports
drwxr-x--- 17 root root 4096 Apr 30 20:45 root
drwxr-xr-x 2 root root 12288 Jan 31 2009 sbin
drwxr-xr-x 2 root root 4096 Jan 31 2009 selinux
drwxr-xr-x 2 root root 4096 Aug 12 2004 srv
drwxr-xr-x 9 root root 0 Apr 30 17:55 sys
drwxr-xr-x 2 root root 4096 Apr 22 09:31 temp_srv
drwxr-xr-x 3 root root 4096 Jan 31 2009 tftpboot
drwxrwxrwt 7 root root 4096 Aug 11 15:57 tmp
drwxr-xr-x 8 oracle oinstall 4096 Feb 17 15:31 u01
-rwxr-xr-x 1 root root 90 Apr 22 09:43 .uniovpath
drwxr-xr-x 16 root root 4096 Jan 31 2009 usr
drwxr-xr-x 26 root root 4096 Apr 22 10:01 var
[root@websrv /]#
 
Old 08-11-2009, 10:33 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Please use du command as shown below.
Code:
[root@localhost ~]# du -h --max-depth=1 /
16K     /lost+found
du: cannot access `/proc/20610/task/20610/fd/4': No such file or directory
du: cannot access `/proc/20610/task/20610/fdinfo/4': No such file or directory
du: cannot access `/proc/20610/fd/4': No such file or directory
du: cannot access `/proc/20610/fdinfo/4': No such file or directory
0       /proc
0       /sys
20K     /tmp
52K     /dev
5.2M    /bin
6.2M    /boot
27M     /etc
62M     /home
52K     /initrd
31M     /lib
4.0K    /media
4.0K    /misc
64M     /mnt
4.0K    /net
145M    /opt
5.6M    /root
4.0K    /RPM
8.5M    /sbin
20K     /selinux
4.0K    /srv
2.3G    /usr
76M     /var
2.7G    /
[root@localhost ~]#
It will show you the 'real size' of directories. When posting, please use code tags (as I did) as it retains the formatting.

Note: taken on an acer aspire one, so the numbers might not be a reference.

Last edited by Wim Sturkenboom; 08-11-2009 at 10:34 AM.
 
Old 08-13-2009, 06:42 AM   #5
epamuk
Member
 
Registered: May 2007
Posts: 62

Original Poster
Rep: Reputation: 15
Hi Wim,

I worked your write command and I saw /usr/lib and /usr/share have a lot big size. This folders contain a lot files. And Maybe I can delete some files in the this folders. Which files can i delete from this folders?

Thanks.

Quote:
[root@websrv ~]# du -h --max-depth=1 /usr/
65M /usr/libexec
52M /usr/NX
47M /usr/sbin
2.1M /usr/kerberos
108M /usr/src
8.0K /usr/etc
313M /usr/bin
130M /usr/evolution28
2.8G /usr/lib
259M /usr/X11R6
42M /usr/local
242M /usr/include
8.0K /usr/games
3.5G /usr/share
7.6G /usr/
[root@websrv ~]#
 
Old 08-13-2009, 07:06 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'd e looking in /usr/share from that output, but you wouldn't ever just delete files, you'd remove the packages that are responsible for those files being there.
 
Old 08-13-2018, 01:30 AM   #7
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268
Blog Entries: 6

Rep: Reputation: Disabled
Same issue here, but I also have files in /usr/share that are come from other systems (I was going to share /usr/share to independent partition with other systems but looks unwell), then you’re nowhere to remove them using packages removal.
 
Old 08-13-2018, 02:32 AM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by hd_scania View Post
Same issue here, but I also have files in /usr/share that are come from other systems (I was going to share /usr/share to independent partition with other systems but looks unwell), then you’re nowhere to remove them using packages removal.
OK. No question here, nor any information. How does your problem relate to this 9-year-old thread?

Please start a new thread with the details of the problem you want help with. Thank you.
 
  


Reply



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
LXer: Delete Unnecessary Files From Your Desktop With BleachBit On Ubuntu 9.04 LXer Syndicated Linux News 0 06-01-2009 11:10 AM
Automated script to DELETE files older than 2 days in a Particular folder siddhartha_ece2004 Linux - Newbie 14 07-11-2008 05:46 AM
bash: delete files older than 7 days in a folder and subfoldes lupomanaro Programming 1 05-07-2008 10:22 AM
Script to delete files from specified folder mrrx7 Solaris / OpenSolaris 4 08-27-2007 03:50 AM
need a script to delete all files from a folder and subfolders cccc Programming 1 03-04-2005 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:10 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