Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok, so I made a bit of a mistake with tar, and now I have a 500MB file in the root of the / directory called -X:
[root@mail /]# ls -al
total 514268
-rw-r--r-- 1 root root 525977600 Oct 18 11:12 -X
drwxr-xr-x 17 root root 4096 Oct 18 11:11 .
drwxr-xr-x 17 root root 4096 Oct 18 11:11 ..
drwxr-xr-x 2 root root 4096 Sep 9 20:32 bin
<snip>
Now, I've obviously tried this:
[root@mail mail]# rm -X
rm: invalid option -- X
Try `rm --help' for more information.
[root@mail mail]#
And I've tried it in quotes:
[root@mail mail]# rm "-X"
rm: invalid option -- X
Try `rm --help' for more information.
[root@mail mail]#
Same thing. I've tried rm *x:
rm *X
rm: invalid option -- X
Try `rm --help' for more information.
[root@mail /]#
So anyway, how in the heck do I get rid of this file? I've got plenty of space on the disk, but it ticks me off, plus it gets written into the backup every night which is stored on another server via nfs, which causes excess network traffic and hogs space on that box as well. If anyone can point out hoe to make this gone, I'd REALLY appreciate it.
I could have used that -- option a while ago. I was struggling with the same problem. I managed to delete the file by logging in through ftp and then giving the delete command. But using the -- would have been a nicer way to do things.
Always so much to learn about linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.