LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-07-2009, 05:06 AM   #1
Procher
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
Exclamation 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
 
Old 11-07-2009, 05:18 AM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
Welcome to LQ procher....

Quote:
Originally Posted by Procher View Post
Which is the command to delete the second file called: index.php\n
Hope you can try the following
Code:
rm 'index.php\n'
Cheers!!!

Last edited by vinaytp; 11-07-2009 at 05:21 AM.
 
Old 11-07-2009, 07:07 AM   #3
Procher
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 11-07-2009, 12:58 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,153

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Maybe rm -i index.ph*

It will ask (Remove file _______ Yes / No ? ) before removing each file that starts with index.ph
 
Old 11-07-2009, 01:24 PM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by Procher View Post
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.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the default webpage configuration from index.php to index.htm, etc meema Linux - Server 4 08-22-2008 09:06 PM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 01:55 AM
Where to put index.php (or index.html) on Slackware 11.0 moonguide Slackware 3 05-08-2007 06:35 PM
apache: shows only my index.php and no other file! xpucto Linux - Software 12 02-21-2006 03:37 AM
Trouble opening index.php file to install eZ publish jedson Linux - Software 2 11-01-2004 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration