LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 06: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, 06:18 AM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

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 06:21 AM.
 
Old 11-07-2009, 08: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, 01:58 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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, 02:24 PM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
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 10:06 PM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 02:55 AM
Where to put index.php (or index.html) on Slackware 11.0 moonguide Slackware 3 05-08-2007 07:35 PM
apache: shows only my index.php and no other file! xpucto Linux - Software 12 02-21-2006 04:37 AM
Trouble opening index.php file to install eZ publish jedson Linux - Software 2 11-01-2004 08:22 AM


All times are GMT -5. The time now is 10:36 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration