Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Garbage File in Root Directory

Status
Not open for further replies.

riscman

Technical User
Aug 7, 2001
4
0
0
US
I have several garbage files ( .?1@$ )in my root directory. When I execute the 'ls' command, my terminal session locks. Can anyone tell me how to delete them?

Thanks in advance,

Jack
 
Instead of ls, could you use something like:

find \ -name '*.?1@$*' -print

to see what they are in the first place, then use this listing (once you're satisfied that they aren't required!) to rm them, possibly like:

find \ -name '*.?1@$*' -exec rm {} \;

Be very careful, particularly executing an rm in the root directory! Are you aware what is causing these files to be produced, as it looks like something that needs sorting out.

HTH.
 
Thanks Ken,


There gone now. I appreciate the quick response.

riscman
 
Dears:

We have a big file into / FS part, and this partition are in 100%, i´d like to know, how can I remove this uname file?
Please see the following FS list

-rw-r--r-- 1 root system 24395776 Nov 22 16:10
drwxr-xr-x 19 bin bin 1024 Nov 23 11:42 .
drwxr-xr-x 19 bin bin 1024 Nov 23 11:42 ..
-rw------- 1 root system 0 Nov 09 18:42 .Xauthority
-rw------- 1 root system 11054 Nov 23 12:12 .sh_history
-rw-r--r-- 1 root system 105 Nov 09 18:38 .xerrors
-rw------- 1 root system 65 Nov 09 18:38 .xsession-errors
-rw-r--r-- 1 root system 0 Dec 21 1999 0
-rw-r--r-- 1 root system 0 Nov 23 11:40 1
drwxr-xr-x 2 root system 512 Jul 11 2000 Patch_H
drwxr-xr-x 2 root system 512 Jul 12 2000 Patch_Hold
drwxr-xr-x 2 root system 512 Jun 29 1999 SMSRUN
drwxr-xr-x 2 root system 512 Aug 18 1999 TT_DB
lrwxrwxrwx 1 bin bin 8 Jun 29 1999 bin -> /usr/bin
-rw-rw-r-- 1 root system 0 Jun 21 01:16 bootrec
-rw-r--r-- 1 root system 4626 Aug 20 1999 bosinst.data
drwxr-xr-x 2 root system 512 Jun 29 1999 cdrom
drwxrwxr-x 4 root system 2560 Nov 23 10:12 dev
-rw-r--r-- 1 root system 0 Nov 23 11:24 esto
drwxr-xr-x 13 root system 3584 Aug 10 16:11 etc
drwxr-xr-x 27 bin bin 512 Sep 19 19:29 home
-rw-r--r-- 1 root system 7203 Jun 21 01:16 image.data
lrwxrwxrwx 1 bin bin 8 Jun 29 1999 lib -> /usr/lib
drwx------ 2 root system 512 Jun 29 1999 lost+found
drwxr-xr-x 26 bin bin 1024 Jun 29 1999 lpp
-rw------- 1 root system 401408 Nov 23 10:30 mbox
-rw-r--r-- 1 root system 655 Jun 29 1999 mex_cnf
-rwxrwxrwx 1 root system 2384 Jun 29 1999 mex_lic
drwxr-xr-x 2 bin bin 512 Jun 29 1999 mnt
drwxr-xr-x 2 root system 512 Jun 29 1999 opt
-rw-r--r-- 1 root system 0 Oct 12 2000 pepe.txt
drwxr-xr-x 3 bin bin 512 Jun 29 1999 sbin
-rw-rw-rw- 1 root system 2245405 Nov 09 18:42 smit.log
-rw-rw-rw- 1 root system 161249 Nov 09 18:42 smit.script
lrwxrwxrwx 1 root system 18 Jun 29 1999 tftpboot -> /usr/ncd/termi
nals
drwxr-xr-x 2 root system 512 Jun 29 1999 tftpboot_O
drwxrwxrwt 6 bin bin 2560 Nov 23 12:12 tmp
lrwxrwxrwx 1 bin bin 5 Jun 29 1999 u -> /home
lrwxrwxrwx 1 root system 21 Jun 29 1999 unix -> /usr/lib/boot/unix
_up
drwxrwxrwx 23 bin bin 512 Dec 15 2000 usr
drwxr-xr-x 16 bin bin 512 May 31 2000 var
#
# df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32768 24 100% 1003 7% /
/dev/hd2 1015808 400664 61% 15619 7% /usr
/dev/hd9var 114688 22284 81% 207 1% /var
/dev/hd3 114688 53568 54% 139 1% /tmp
/dev/hd1 16384 15024 9% 149 4% /home
/dev/SMSRUN 6389760 3135484 51% 14251 1% /usr/EBS/SMS/3.3.0/RUN
#

Thanks

Francisco A. Altamirano
SWITCHING NETWORK
NEXTEL Argentina
Palestina 977 - Tel. +54 11 49982620

 
Try [tt]ls -lia / [/tt] and then get the first number, the file i-node.
Then try
[tt]find / -inum [red]the_number[/tt] -ok rm {} \;[/tt]
and answer Y to the adequate question.
I hope it works...
Unix was made by and for smart people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top