Unable to remove files from rm command


 
Thread Tools Search this Thread
Operating Systems AIX Unable to remove files from rm command
# 1  
Old 07-26-2010
Unable to remove files from rm command

I need to delete some files which are not getting removed not even from root user

Code:
-rw-r-----   1 ptml     tellin            0 Jul 26 19:23 temp.out1
-rw-r-----   1 ptml     tellin            0 Jul 26 19:23 temp.out
-rw-r-----   1 ptml     tellin            2 Jul 26 19:23 prev
-rw-r-----   1 ptml     tellin            2 Jul 26 19:23 curr
.wrir-----   1 ptml     tellin            0 Jul 26 19:23 KHISCP1_SAR-

when i try to delete these files it says

Code:
<[username]:/dir> rm KHISCP1_SAR-
rm: KHISCP1_SAR-: A file or directory in the path name does not exist.

plz tell me how can i delete these files

Last edited by Scott; 07-26-2010 at 11:51 AM.. Reason: Code tags, please...
# 2  
Old 07-26-2010
1. Its strange that, permission bits of that specific file looks different.

2. try removing the file using, find out the inum by 'ls -i', and then delete the file using find command as, 'find -inum <INUM> -exec rm {} \;'
# 3  
Old 07-26-2010
the file isn't appearing when using ls -i but it appears when I do ls -ltr

Also i have to delete these files as well
-rw-r----- 1 ptml tellin 0 Jul 26 19:23 temp.out1
-rw-r----- 1 ptml tellin 0 Jul 26 19:23 temp.out
-rw-r----- 1 ptml tellin 2 Jul 26 19:23 prev
-rw-r----- 1 ptml tellin 2 Jul 26 19:23 curr

they are also getting the same error but are appearing on ls -i

2595114 -rw-r----- 1 ptml tellin 2 Jul 26 19:23 curr
2594817 -rw-r----- 1 ptml tellin 2 Jul 26 19:23 prev
2594818 -rw-r----- 1 ptml tellin 0 Jul 26 19:23 temp.out
2595112 -rw-r----- 1 ptml tellin 0 Jul 26 19:23 temp.out1

Kindly guide me how to delete these exact files by using inum
# 4  
Old 07-26-2010
does ls -litr show it?
# 5  
Old 07-26-2010
Yes it was showing and I have deleted these files Smilie. thanks. The problem was that it has special characters in its name which i found through "ls -b"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shellscript command to remove files starting with a certain string, and older than 3 days

Hi All, Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days. That means files created with that prefix, today or yesterday, shouldn't be removed. Thanks, Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

2. Shell Programming and Scripting

SORRY REPOST - unable to remove

Hi, I have a requirement to fetch the length of a line within awk. I see that wc -c returns the number of bytes consumed, which is my requirement. However, the "length" function does not return the same, when I have non-ascii characters which are more than 1 byte. I have tried the below... (1 Reply)
Discussion started by: tostay2003
1 Replies

3. AIX

Unable to remove VIOS disk

Hello, I am unable to remove the disk, whenever i remove the disk using rmdev -dl hdisk2 or rmdev -Rdl hdisk2 the disk appears back when i run cfgmgr but unable to create any volume group on it # mkvg -y foovg hdisk2 0516-008 /usr/sbin/mkvg: LVM system call returned an unknown ... (20 Replies)
Discussion started by: filosophizer
20 Replies

4. Solaris

Unable to remove package in Solaris-10

I am installing a IBM package (ILMT) on Solaris-10 box, which is having few non global zones. It is not allowing me to remove old package and not allowing me to install new one. root@pqdb_s50:/root# pkgrm ILMT-TAD4D-agent ## Waiting for up to <300> seconds for package administration commands to... (18 Replies)
Discussion started by: solaris_1977
18 Replies

5. Solaris

Command to remove existing files in the tar files in Solaris 10

Hi, I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios. 1)How to delete the existing files in the tar file. suppose i have a main tarfile named application.tar and it contains a file called ingres.tar. what is the command to remove ingres.tar... (2 Replies)
Discussion started by: muraliinfy04
2 Replies

6. Shell Programming and Scripting

Faster command to remove headers for files in a directory

Good evening Im new at unix shell scripting and im planning to script a shell that removes headers for about 120 files in a directory and each file contains about 200000 lines in average. i know i will loop files to process each one and ive found in this great forum different solutions... (5 Replies)
Discussion started by: alexcol
5 Replies

7. AIX

Unable to remove APAR -- any solution ?

Hello I would like to remove the APARs # instfix -ivk IY68989 IY68989 Abstract: write to mmapped space hangs Fileset bos.mp:5.3.0.30 is applied on the system. Fileset bos.mp64:5.3.0.30 is applied on the system. All filesets for IY68989 were found. # instfix -ivk IY73497 IY73497... (2 Replies)
Discussion started by: filosophizer
2 Replies

8. Solaris

Unable to remove links of Cleared metas

Hi, have few meta devices which were cleared some year ago but still appear in /dev/md/rdsk. If I create a same meta device again, it shows old timestamp of 2009yr I tried devfsadm -C to clear unlinked links but of no use. What am I missing ? (2 Replies)
Discussion started by: tuxian
2 Replies

9. Red Hat

Unable to remove shared memory in Redhat Linux

unable to remove shared memory using ipcrm -m in linux $ ipcs -m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 32768 root 644 80 2 0x00000000 65537 root ... (4 Replies)
Discussion started by: LinuxLearner
4 Replies

10. UNIX for Dummies Questions & Answers

Unable to remove folder in linux

Hi I am using red hat linux, In my folder a strange folder is created i.e. " -a " , folder name is preceded with hyphen. Now if i try to remove with rm -rf -1 , i am unable to do it. Can anyone please let me know how to do it, & what this kind of folder means Thanks Sarbjit (3 Replies)
Discussion started by: sarbjit
3 Replies
Login or Register to Ask a Question