Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
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.
|
 |
11-07-2009, 05:06 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 2
Rep:
|
How to delete a file with this syntax: index.php\n
Hello,
I have a big problem, in several folders, I have 2 files:
index.php
index.php\n
The first is correct but not second.
Which is the command to delete the second file called: index.php\n
I do not to find...
Please help me.
Pascal
|
|
|
11-07-2009, 05:18 AM
|
#2
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
Welcome to LQ procher....
Quote:
Originally Posted by Procher
Which is the command to delete the second file called: index.php\n
|
Hope you can try the following
Cheers!!!
Last edited by vinaytp; 11-07-2009 at 05:21 AM.
|
|
|
11-07-2009, 07:07 AM
|
#3
|
LQ Newbie
Registered: Nov 2009
Posts: 2
Original Poster
Rep:
|
Hello,
No, here message when: rm 'index.php\n'
rm: cannot lstat `index.php\\n': No such file or directory
Are-you another suggestion?
Pascal
|
|
|
11-07-2009, 12:58 PM
|
#4
|
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,153
|
Maybe rm -i index.ph*
It will ask (Remove file _______ Yes / No ? ) before removing each file that starts with index.ph
|
|
|
11-07-2009, 01:24 PM
|
#5
|
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375
|
Quote:
Originally Posted by Procher
Hello,
No, here message when: rm 'index.php\n'
rm: cannot lstat `index.php\\n': No such file or directory
Are-you another suggestion?
Pascal
|
Don't use escape characters in file names, really isn't a good idea. I think the method above should work tho.
|
|
|
All times are GMT -5. The time now is 07:15 AM.
|
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
|
|