LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Remove Files from the Directory .... (http://www.linuxquestions.org/questions/linux-security-4/remove-files-from-the-directory-5937/)

shib_s 08-28-2001 08:55 AM

Remove Files from the Directory ....
 
I am running Linux release 2.2.14-12, Red Hat 6.2, on machine i686,
Pentium processor.

The problem on my system is I am not able to remove a directory. There
are some files in it which are not permitting me to do the same. Please
suggest me how to move about.

Following are the details.
-------------------------------------------------------

[root@drona RC]# pwd
/users/home/jyotsna/work/rough_iaetest/source/RC

[root@drona RC]# ls -al
total 1524790736
drwxrwxrwx 2 jyotsna adagrp 3072 Aug 27 23:37 .
drwxrwxrwx 3 jyotsna adagrp 2048 Aug 27 19:39 ..
s-w-r----x 1294 65475 25437 4294967295 Apr 19 1987 Image.itcl,v
-r----S--t 32326 34896 11587 4294967295 May 27 1989 ImageAnchorPresenter.itcl,v
?rw-r-s--- 27924 2132 4616 4294967295 Nov 24 1972 ImageResource.itcl,v
c---rws--x 10818 40884 24439 129, 33 Nov 9 1954 ImageResourcePresenter.itcl,v

[root@drona RC]# file *
Image.itcl,v: socket
ImageAnchorPresenter.itcl,v: setgid sticky file: read failed (Input/output error).

[root@drona RC]# stat *

File: "Image.itcl,v"
Size: -1 Filetype: Unknown
Mode: (0241/?-w-r----x) Uid: (65475/ (none)) Gid: (25437/ (none))
Device: 22,2 Inode: 36931 Links: 1294 Access: Thu Oct 3 16:21:38
1963(13844.00:47:06) Modify: Sun Apr 19 09:50:23 1987(05245.07:18:21)
Change: Wed Nov 9 00:45:14 1949(18920.16:23:30)

File: "ImageAnchorPresenter.itcl,v"
Size: -1 Filetype: Regular File
Mode: (3401/-r----s--t) Uid: (34896/ (none)) Gid: (11587/ (none))
Device: 22,2 Inode: 36933 Links: 32326 Access: Sun Mar 6 16:39:13
1977(08941.00:29:31) Modify: Sat May 27 05:11:36 1989(04476.11:57:08)
Change: Wed Nov 23 07:06:32 1949(18906.10:02:12)

File: "ImageResource.itcl,v"
Size: -1 Filetype: Unknown
Mode: (2650/?rw-r-s---) Uid: ( 2132/ (none)) Gid: ( 4616/ (none))
Device: 22,2 Inode: 36935 Links: 27924 Access: Mon Dec 8 15:24:20
1913(-17670.-4:-20:-32) Modify: Fri Nov 24 08:58:39 1972(10504.08:10:05)
Change: Tue Jul 4 04:17:13 1961(14665.12:51:31)

File: "ImageResourcePresenter.itcl,v"
Size: -1 Filetype: Character Device
Mode: (2071/c---rws--x) Uid: (40884/ (none)) Gid: (24439/ (none))
Device: 22,2 Inode: 36936 Links: 10818 Device type: 129,33 Access: Sat Sep
14 02:12:57 1985(05827.14:55:47) Modify: Tue Nov 9 12:19:36 1954(17094.04:49:08)
Change: Sun Nov 30 03:31:44 1947(19630.13:37:00)

[root@drona RC]# du -mh *
163G Image.itcl,v
96G ImageAnchorPresenter.itcl,v
838G ImageResource.itcl,v
357G ImageResourcePresenter.itcl,v

[root@drona RC]# rm -rf *
rm: cannot unlink `Image.itcl,v': Operation not permitted
rm: cannot unlink `ImageAnchorPresenter.itcl,v': Operation not permitted
rm: cannot unlink `ImageResource.itcl,v': Operation not permitted
rm: cannot unlink `ImageResourcePresenter.itcl,v': Operation not permitted

---------------------------------------------------

I am doing all operations by logging as the superuser, ie root. I don't
know how these files have crept in. I am certainly not in need of the
files, and I want to remove them.

Thanking you for your time and consideration, and waiting for a prompt
reply from you ! :Pengy:

jharris 08-28-2001 10:24 AM

If I were you I'd check your file system's consistancy - run fsck on the problem FS and see what it turns up. If its the root file system then you'll need to boot from floppies and not use that file system as you can't fsck a file systems that is mounted... If this doesn't turn up anything then you can just try to remove the directory using
Code:

rm -rf directoryName
cheers

Jamie...

unSpawn 08-28-2001 05:53 PM

Sherlock unSpawn, Act IV, A Deduction.
 
Part one: Itcl
"[incr Tcl] (or Itcl, for short) is an object oriented extension of Tcl which has been developed by Michael McLennan. The object semantics of Itcl is mostly borrowed from C++, which makes it suitable for mapping C++ class hierarchies to it."
I'd say, these must be files from a project...

Part two: M.O.'s share ",v".
An extension which would be used by RCS type versioning tools...

My deduction, mr Watson, would be these files to be the glowing embers of a project left for dead, but still smouldering, locked into the versioning system, as they are.

The remedy is simple. Exercise your RCS-stylee powers to unlock these files, and then delete them.


All times are GMT -5. The time now is 06:54 AM.