LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-07-2012, 12:38 PM   #1
decenter
Member
 
Registered: Sep 2011
Distribution: Fedora release 21 (Twenty One)
Posts: 156

Rep: Reputation: 19
Can't delete file


Hi,

Today a new problem. There is a folder and two files displayed in my debian 6 server. When ever I try to delete it, it wont.It will say "No such file or directory). But it displays the folder and files. I used rm -rf command. I'm with full root permission. How to delete those?

Thanks
 
Old 01-07-2012, 01:34 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hello,

Could you show us the full directory path, along with a detailed list view of the contents? (ls -al)

Cheers,

Josh
 
Old 01-07-2012, 08:00 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,991

Rep: Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448Reputation: 2448
you might want to use the "rmdir" command .

and have a read through some terminal tutorials
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
 
Old 01-08-2012, 01:00 AM   #4
decenter
Member
 
Registered: Sep 2011
Distribution: Fedora release 21 (Twenty One)
Posts: 156

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by corp769 View Post
Hello,

Could you show us the full directory path, along with a detailed list view of the contents? (ls -al)

Cheers,

Josh
Quote:
drwxrwx--- 2 jessi jessi 4096 Jan 6 11:14 flat\rent_it\
-rw-rw---- 1 jessi jessi 0 Jan 6 11:14 flat\rent_it\details.txt
-rw-rw---- 1 jessi jessi 272 Jan 6 11:14 flat\rent_it\details.txt
Even when I try to delete the files via FTP, it said there is no such file, but it is displaying. This is so weird.

Thanks
 
Old 01-08-2012, 06:09 AM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Is that the actual output of ls -al?
 
Old 01-08-2012, 07:26 AM   #6
decenter
Member
 
Registered: Sep 2011
Distribution: Fedora release 21 (Twenty One)
Posts: 156

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by corp769 View Post
Is that the actual output of ls -al?


Yes. That's weird. These files are displaying , but not in filesystem. (It is there, but not there).
 
Old 01-08-2012, 07:38 AM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Try the following:
Code:
file details.txt
Also try seeing if you can open the file with vim or such editor. If the file command gives you any output, you know that the file is really there. This is weird indeed.
 
1 members found this post helpful.
Old 01-08-2012, 07:57 AM   #8
decenter
Member
 
Registered: Sep 2011
Distribution: Fedora release 21 (Twenty One)
Posts: 156

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by corp769 View Post
Try the following:
Code:
file details.txt
Also try seeing if you can open the file with vim or such editor. If the file command gives you any output, you know that the file is really there. This is weird indeed.
Solved. Finally deleted it. I have to use
Code:
rm flat\\rent_it\\details.txt
.Instead I was using
Code:
rm flat\rent_it\details.txt
. Thanks for helping a lot and sorry for kinda confusing you.
 
Old 01-08-2012, 08:03 AM   #9
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Glad you've got is solved. On a side note, have a look at Bash special characters on how to escape them. This happens when you use a special character like a '\' or others in a filename. I'm sure Josh is still a bit sleepy since he didn't notice it earlier.

Kind regards,

Eric
 
Old 01-08-2012, 08:05 AM   #10
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
I thought that looked different. And yes Eric, I am a bit out of it. At first, I thought "He needs to escape the backslash" but didn't think to mention it. Due for my medications.....

Cheers,

Josh
 
  


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
user can upload and download file but not delete file in ftp on thel 6 kukusuku Linux - Server 1 08-21-2011 03:50 AM
Create the file, write into that file but can't delete file in Linux pandunr Linux - Newbie 3 06-15-2011 09:45 AM
file from install ffmpeg conflicts w/file from package fmpeg-libs: which to delete? ybalazs Linux - Software 0 10-27-2009 02:21 AM
Upload file to ftp server -vsftp- but can not delete or change the file once uploaded murattas6 Linux - Server 2 06-26-2009 07:00 AM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 03:46 AM


All times are GMT -5. The time now is 12:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration