Files not getting deleted with rm & occupying space in filesystem


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Files not getting deleted with rm & occupying space in filesystem
# 1  
Old 09-02-2015
Files not getting deleted with rm & occupying space in filesystem

Hello,

OS version is Red Hat Enterprise Linux Server release 6.5 (Santiago).

In one of the filesystem some old files post clone are not getting removed even with 'rm'


Code:
# ls -ltr | grep meagpd_62.dbf
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:46 meagpd_62.dbf
# rm meagpd_62.dbf
rm: cannot remove `meagpd_62.dbf': No such file or directory

Code:
lsof | grep deleted

Also doesn't show any OPEN files.

We even tried rebooting the server, but the files still remain.

Please let me know, how should I proceed.

Thanks
This User Gave Thanks to saharookiedba For This Post:
# 2  
Old 09-02-2015
Does it possibly contain unprintable chars like <0x0D> (=^M)?
This User Gave Thanks to RudiC For This Post:
# 3  
Old 09-02-2015
it is a Oracle Database Datafile... If I try to view the file, view treats it as a new file.
This User Gave Thanks to saharookiedba For This Post:
# 4  
Old 09-02-2015
Hello saharookiedba,

I am pretty much sure it is because file name is not exactly what we are seeing on screen seems some extra non-printable characters added to file names, could you please try either ls -b OR ls -q and see if that helps you, let us know what happens after these commands execution.

EDIT: Just adding about commands details.
Quote:
ls -b prints octal codes for nongraphic characters zzz\010\010\010aaa
ls -q prints question marks for nongraphic characters zzz???aaa

Thanks,
R. Singh

Last edited by RavinderSingh13; 09-02-2015 at 08:57 AM.. Reason: Added a manual page explaination for ls -b and ls -q commands
This User Gave Thanks to RavinderSingh13 For This Post:
# 5  
Old 09-02-2015
Bingo,

Thanks a lot Ravinder.

Code:
 
# ls -ltrb
total 425979768
drwxr-xr-x 2 root   root              96 Nov 10  2013 lost+found
-rw-rw---- 1 oracle oinstall    58310656 Sep 23  2014 control_2.ctl.23092014
-rw-rw---- 1 oracle oinstall    58310656 Sep 24  2014 control_2.ctl.24092014
drwxrwxr-x 2 oracle oinstall        8192 May  7 05:41 arch
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:45 meagpd_58.dbf\
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:46 meagpd_59.dbf\
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:46 meagpd_62.dbf\
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:46 meagpd_61.dbf\
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:46 meagpd_60.dbf\
-rw-rw---- 1 oracle oinstall 34358697984 Sep  1 08:47 meagpd_57.dbf\

Now, how should I delete them?

Code:
 
# rm "meagpd_62.dbf\"
>

This User Gave Thanks to saharookiedba For This Post:
# 6  
Old 09-02-2015
Hello saharookiedba,

Happy to help you, you can hit Thank you button at the left corner of each post to thank any person here.
Also following are the steps for same.

1st: Get inum value for files by doing:
Code:
ls -il {file-name}

2nd: You can do following command to delete file with their inum value:
Code:
find . -inum [inode-number] -exec rm -i {} \;

Hope above helps, will be happy if that helps.

Thanks,
R. Singh
These 2 Users Gave Thanks to RavinderSingh13 For This Post:
# 7  
Old 09-02-2015
Why not just rm meagpd_62.dbf*
These 2 Users Gave Thanks to RudiC For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to reallocate the deleted logfile space?

Hi All, I know this is a simple question but i am not sure the exact answer it. Here is the question: There is a huge log file , if we delete the log file ,how the corresponding occupied file memory relocate to Hard Disk. Thanks Srinivas (3 Replies)
Discussion started by: Srinivas Gadi
3 Replies

2. UNIX for Dummies Questions & Answers

Reclaim deleted disk space

I have a disk space issue on one of my unix servers. it is showing 98% full.. i found the offending folder and removed it. but i have not reclaimed the disk space. is there another command that i need ? thank you in advance for any assistance. (4 Replies)
Discussion started by: JanSP
4 Replies

3. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

4. Shell Programming and Scripting

Shell script delete log files from folder & subfolders on space usage

Hi, I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes. I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Discussion started by: saha
3 Replies

5. AIX

Adding space to a filesystem

Hello I have a flesystem that has run out of space. I have tried using the following command to add space: # chfs -a size=+100 /lsrc I get the following error: 0516-404 allocp: This system cannot fulfill the allocation request. There are not enough free partitions or not enough... (9 Replies)
Discussion started by: dkranes
9 Replies

6. Filesystems, Disks and Memory

calculating the filesystem space

Hi, Just wanted to confirm that what Im doing is correct to calculate the space allocated to filesystem: >df -k . Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /test 48720000 9337904 81% 14846 1% /home The space allocated = 48720000/1024 =... (1 Reply)
Discussion started by: deepakgang
1 Replies

7. Solaris

Command used for checking space occupied by files & sub-direc's inside a mount in %?

Hi, I want to know the command which can be used for finding the % of disk space occupied by files & sub-folders inside a given mount in Sun Solaris For eg: I have /tmp/ folder when I sat df -k it will give the percentage of space used by /tmp/. Say if I want to see how much % the files &... (2 Replies)
Discussion started by: weblogicsupport
2 Replies

8. Solaris

free space, associated by filesystem name...

is there a command that will display amount of free space...associated by filesystem name? # df /home /home (/dev/dsk/c1t0d0s3 ): 8069326 blocks 487280 files HP has bdf: bdf /home Filesystem kbytes used ... (2 Replies)
Discussion started by: mr_manny
2 Replies

9. UNIX for Advanced & Expert Users

Increasing filesystem space

Now, i know a ufs file system can be increased using mkfs but hwo do I take space from a file system and add it to another file system? at my job here, that seems to be possible because I see request on it almost every day. what is the exact command to do this and does the system need to be... (1 Reply)
Discussion started by: TRUEST
1 Replies

10. Shell Programming and Scripting

How to keep white space is being deleted using read

I am using Posix shell to write a script. The problem I am having is that when I use the read command to go through a file I lose the tabs. How can I keep this from happening? (1 Reply)
Discussion started by: keelba
1 Replies
Login or Register to Ask a Question