1833302 Members
2946 Online
110051 Solutions
New Discussion

Huge files in root dir

 
Jim Bonia
Occasional Advisor

Huge files in root dir

I just found that / is 97% full.
This is obviously no good so looking in there I found two mysterious files. One is a file with the same name as the hostname and another file is the name of our backup server (a sun box). Both these files are nearly 14 MBs.
Anyone seen this before and is it safe to get rid of them?
8 REPLIES 8
Uday_S_Ankolekar
Honored Contributor

Re: Huge files in root dir

Well,

Do a file on those filename and see what kind of file this is.
Ex: file yourhostname. It looks like somebody might have created these files. You can saftly remove it. Or if it has any valuable info then move it to somewhere else.

Goodluck,
-USA...
Good Luck..
PIYUSH D. PATEL
Honored Contributor

Re: Huge files in root dir

Hi,

You can copy this file in another directory if you have space, check the contenst of the file if they are readable (text) and then safely remove these files.

I have not heard of such files.

Piyush
Mike Hassell
Respected Contributor

Re: Huge files in root dir

Jim,

Chances are that this is a script or command that was intented to use a hostname as a paramater, but rather wrote it to these filenames. Of course you'll want to look into it further, by looking at the file dates and such.

I would move these files into another filesystem that has some free space available. If you don't have the space to work with in another filesystem, then back them up to tape to be sure. It's always good to have a copy, in the event that there is a real need for these files.

Be sure to take a look at what user created them and determine what they actually are so you can prevent them from being created in the future. I would try:

file

and depending on the results from that:

strings

more

Hope that helps.

-Mike
The network is the computer, yeah I stole it from Sun, so what?
Jim Bonia
Occasional Advisor

Re: Huge files in root dir

I did as you kindly suggested (file and mv) and now / is back to just over 50%

Thanks to all.
Jim
Jim Bonia
Occasional Advisor

Re: Huge files in root dir

Mike, it says they are owned by root system.
If anything goes out of whack I can copy them back from wher they were moved.

Thanks
Jim
PIYUSH D. PATEL
Honored Contributor

Re: Huge files in root dir

Hi,

Yes once you copy them to another filesystem you can always restore them back if you require them.

Read the contest of the file thro strings or vi and find out.

Piyush

Bill Thorsteinson
Honored Contributor

Re: Huge files in root dir

I have seen this when the : was missed on an rcp or scp
command.

scp largefile remotehost

instead of

scp largfile remotehost:

It dropps the file in the current directory. Usually
this is a commandline problem.

Check the shell history for root.
Martin Johnson
Honored Contributor

Re: Huge files in root dir

Did you do an "fuser" on the file to see if the file was opened by some process?

Marty