LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-05-2015, 10:34 PM   #1
Zero4
Member
 
Registered: Jun 2007
Posts: 71

Rep: Reputation: 0
Can not delete directory


Hi
I am trying to delete some directories from the command line of my CentOS 7 machine,
there is no gui.
When I issue this comman
Code:
rmdir dirnane
it returns
Code:
cannot remove udirnameu:no such file or directory
There are "-" above the u's on either side of the name. I could not reproduce that character

Thank you
 
Old 09-05-2015, 10:41 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Have you tried 'rmdir *dirname*'? It seems you have some unicode characters in the name.
 
Old 09-06-2015, 04:51 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
..and output of 'stat /path/to/directory' could help too.
 
Old 09-06-2015, 06:10 AM   #4
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
Try this:
Code:
ls -i
then for files
Code:
find -inum inode_number -delete
or for directories
Code:
find -inum inode_number -exec rm -rvf {} +

Last edited by Hasek39; 09-06-2015 at 06:12 AM.
 
Old 09-07-2015, 06:39 AM   #5
EternalCuriosity
LQ Newbie
 
Registered: Sep 2014
Location: Nepal
Distribution: RHEL
Posts: 16

Rep: Reputation: Disabled
Use wildcard

Quote:
Originally Posted by Zero4 View Post
Hi
I am trying to delete some directories from the command line of my CentOS 7 machine,
there is no gui.
When I issue this comman
Code:
rmdir dirnane
it returns
Code:
cannot remove udirnameu:no such file or directory
rmdir is for deleting empty directory. If it's not empty, try:

Code:
rm -r ?dirname?
 
  


Reply



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
[SOLVED] Cannot delete a recently created directory in Lubuntu, or files in that directory l33y Linux - Newbie 26 06-07-2014 05:49 AM
how to delete directory in a existing directory with single command Tauatioti Linux - Newbie 1 11-30-2013 04:04 AM
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 06:54 PM

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

All times are GMT -5. The time now is 08:15 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
Open Source Consulting | Domain Registration