Results 1 to 6 of 6
Hi,
I have this file in my working directory i am having problems deleting. When i use the rm command, i am getting the following:
"rm: cannot remove `cold_re_inj_com.dat.gz': Invalid ...
- 12-07-2006 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 6
problem deleting file using rm
Hi,
I have this file in my working directory i am having problems deleting. When i use the rm command, i am getting the following:
"rm: cannot remove `cold_re_inj_com.dat.gz': Invalid argument"
Is there anything else i can do to remedy this problem. This file is taking all my disk space and i need it deleted as quickly as possible.
Thanks in advance for the assistance.
James
- 12-07-2006 #2
Hi James
,
I can't figureout what the problem could be....
Try this simple c program,
-----------------------
#include<sys/stat.h>
/* Below enter Filename to be Removed with complete path name like "/root/home/cold_re_inj_com.dat.gz"*/
#define XYZ "/root/home/cold_re_inj_com.dat.gz"
main(){
int i;
i=unlink(XYZ);
if(i==0)
printf("\nFile Removed");
else
printf("\nFile not Deleted...");
}
----------------------
I guess i should work
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 12-07-2006 #3
Was that first single quote a proper single quote ( ' ) or a backquote ( ` )? If it was a backquote, that would explain your error message. You need two single quotes or two double quotes to literalise a string such as a filename. Backquotes mean something different: they are used to enclose a command that is to be replaced by its output.
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 12-07-2006 #4
That backquote is a part of the rm output: it doesn't have anything to do with the command he entered.
Are you sure that you're in the same directory as the file? Try using the full path of the file, for instance:
Code:rm /home/user/the_file
DISTRO=Arch
Registered Linux User #388732
- 12-08-2006 #5Just Joined!
- Join Date
- Nov 2006
- Posts
- 6
Hi,
Thanks for responding. I am in the same directory as the file and the rm command is not just working. I even tried using the -f to force the file to be removed but that too failed. When i entered the full as you suggested, i got the following message:
rm: cannot remove `/home/jw656314/willie/cold_re_inj_com.dat.gz': Invalid argument
This thing sucks. The file is taking up almost all my directory space and yet i cannot delete the file.
Thanks again.
James
- 12-08-2006 #6Just Joined!
- Join Date
- Nov 2006
- Posts
- 6
Hi Again,
This is the thing i get when i type the "ls -lrt" command:
?---------?---------+ ? ? ? ? ? cold_re_inj_com.dat.gz
No way to figure out the kind of file or the file size
Maybe this will throw more light on my problem.
James


Reply With Quote