Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-07-2006, 07:50 PM
|
#1
|
LQ Newbie
Registered: Apr 2005
Posts: 29
Rep:
|
How to remove this file?
There's a file named "-X", I can not remove it, please help!
I already tried these:
rm -rf -X
rm -rf "-X"
rm -rf \-X
rm -rf "-"X
rm -rf /-\X
rm -rf /-/X
Last edited by cqmyg5; 06-07-2006 at 07:52 PM.
|
|
|
06-07-2006, 07:53 PM
|
#2
|
LQ Newbie
Registered: Apr 2005
Posts: 29
Original Poster
Rep:
|
Oh, I get it,
rm -- -X
|
|
|
06-07-2006, 07:54 PM
|
#3
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
'rm *X' maybe?
regards,
...drkstr
|
|
|
06-07-2006, 10:56 PM
|
#4
|
Member
Registered: Nov 2005
Posts: 183
Rep:
|
yeah, rm -- -X
is the way
soule
|
|
|
06-08-2006, 01:56 PM
|
#5
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
The other classic is the files that Emacs creates when you exit in a hurry:
#myfile#
Those are fun to try to delete
|
|
|
06-08-2006, 02:54 PM
|
#6
|
Member
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279
Rep:
|
Quote:
Originally Posted by Randux
The other classic is the files that Emacs creates when you exit in a hurry:
#myfile#
Those are fun to try to delete
|
Actually I did that yesterday and typing
rm # (tab)
immediately gave this
rm \#
Dennisk
|
|
|
06-09-2006, 01:45 AM
|
#7
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Yeah, ain't Bash completion grand?
|
|
|
06-10-2006, 12:36 PM
|
#8
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
You can usually -- usually! -- remove files like that with
rm ./-X
Now, that's sh and ksh but it ought to work in any sh-like shell...
|
|
|
06-10-2006, 01:31 PM
|
#9
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep:
|
Quote:
Originally Posted by Randux
The other classic is the files that Emacs creates when you exit in a hurry:
#myfile#
Those are fun to try to delete
|
You can also delete these by encasing the filename in double quotes, i.e.
$ rm "#myfile#".
|
|
|
06-11-2006, 01:18 AM
|
#10
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Quote:
Originally Posted by cqmyg5
Oh, I get it,
rm -- -X
|
You have to be the first person I've ever seen to figure this out on their own. Kudos to you.
|
|
|
06-11-2006, 01:38 AM
|
#11
|
Member
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796
Rep:
|
really?
the man page says it quite plainly
|
|
|
All times are GMT -5. The time now is 05:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|