View Full Version : Help! Deleting directory under root?
cns5p
February 26th, 2009, 19:59
Forgive me as I am inexperienced with using freebsd. I accidentally created a director called "restore" in the root directory and now I want to delete the directory. I try to cd to the directory but it says "not found/" Any ideas?
graudeejs
February 26th, 2009, 20:02
rm -R relative/path/to/directory
or
rm -R /absolute/path/to/dir
as root or dir owner
cns5p
February 26th, 2009, 20:06
Thanks for the quick response? Why can I not cd to the directory to see whats in there before deleting it?
graudeejs
February 26th, 2009, 20:20
you probably are not owner/group member.... [don't have permissions] of the dir
otherwise
cd path/to/dir
ls
read entire chapter
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/basics.html
cns5p
February 26th, 2009, 20:24
Hm.. I am logged in as root. I will have to read more into it.
ale
February 26th, 2009, 23:51
Can we see the command you are typing?
fronclynne
February 27th, 2009, 14:25
chown u+x /root/restore
perhaps?
oops, chmod, sorry
vivek
February 27th, 2009, 17:04
What is the output of
cd /root
ls -l
cy@
February 27th, 2009, 18:07
If you're logged in as root and still cannot delete the directory, assuming the filesystem is mounted rw and securelevel is set to -1, you might have some filesystem corruption that is prohibiting you from deleting the directory. I haven't seen this on a FreeBSD system before however I've had to deal with this many times on Solaris systems. In those cases the system ran nicely however at reboot the filesystem in question was so badly corrupted it required a newfs and restore from backup.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.