LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 01-20-2002, 10:57 PM   #1
mjakob
Member
 
Registered: Feb 2001
Posts: 69

Rep: Reputation: 15
I feel stupid asking this...


But, here it goes.

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.

Thanks,
Mark
 
Old 01-20-2002, 11:11 PM   #2
notsoevil
Member
 
Registered: May 2001
Location: Louisville, Kentucky, USA
Distribution: RedHat ES
Posts: 120

Rep: Reputation: 15
rm -- -X

The '--' signifies the end of options.
 
Old 01-20-2002, 11:39 PM   #3
mjakob
Member
 
Registered: Feb 2001
Posts: 69

Original Poster
Rep: Reputation: 15
It worked. I salute you. Thanks a bunch!

I'm so happy now. I knew someone would know.

Thanks,
Mark
 
Old 01-21-2002, 12:48 AM   #4
inv|s|ble
Member
 
Registered: Dec 2001
Distribution: freeBSD, slack 9/10/current
Posts: 59

Rep: Reputation: 15
you could have also done rm "-X"
 
Old 01-21-2002, 12:54 AM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by inv|s|ble
you could have also done rm "-X"
he seemed to have tried that.
Quote:
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]#
notsoevil i think in this case gave one of the few ways to remove this file.
 
Old 01-21-2002, 01:15 AM   #6
inv|s|ble
Member
 
Registered: Dec 2001
Distribution: freeBSD, slack 9/10/current
Posts: 59

Rep: Reputation: 15
this is the last time, i browse the questions, without my coffee first thing in the morning..
 
Old 01-21-2002, 04:31 AM   #7
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid, stupid question; I lost Klaptop. :( Surfrider Slackware 2 08-31-2005 10:12 PM
God do I feel stupid, please read, laugh and help! jmpmjmpm Linux - General 12 02-22-2005 05:18 PM
Stupid Dumb Stupid Question... drigz Linux - Software 3 09-23-2004 04:09 PM
stupid stupid newb ? what to use instead of xconfigurator h00ligan Fedora 3 01-25-2004 10:51 PM
I Feel Stupid:) Insanepyro69 Linux - Newbie 21 11-11-2001 01:19 AM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration