Re: rm question
I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. i use rm -r instead. /Jonas
Re: rm question
Try 'rm -rf kdeo'. - Original Message - From: Antonio Rodriguez [EMAIL PROTECTED] To: debian-user@lists.debian.org Sent: Wednesday, March 29, 2000 1:47 AM Subject: rm question I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Thanks, Antonio. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: rm question
[EMAIL PROTECTED] (Antonio Rodriguez) wrote: I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Firstly, the kernel and the C library can return EPERM whenever they like, whether you're root or not. Being root doesn't let you override the kernel, at least not without installing a new one or bypassing it entirely by accessing the disk devices directly. The -d argument to rm can and probably will damage your filesystem. Don't use it. Use -r instead: so, 'rm -r kdeo', or, if you're *really* sure, 'rm -rf kdeo' to tell it not to ask you for every file. -- Colin Watson [EMAIL PROTECTED]
Re: rm question
On Tue, Mar 28, 2000 at 04:47:38PM +, Antonio Rodriguez wrote: I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. you don't want to delete non-empty directories that way unless you want filesystem corruption. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? rm -rf kdeo no questions asked recursivly removes every file directory below kdeo. be careful alcohol and rm -rf don't mix ;-) Thanks, Antonio. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- Ethan Benson http://www.alaska.net/~erbenson/
Re: rm question
Antonio Rodriguez [EMAIL PROTECTED] writes: AR I want to delete a directory with a whole bunch of embeded AR subdirectories, I did AR rm -d kdeo AR and I get Operation not permitted. AR Now, I am doing it as root, so, the permission should not be an issue. AR Whats the problem? Is there a better way of removing a sequence of such AR embedded directories? Yup. What 'rm -d' is supposed to do actually requires a bit of not-necessarily-useful explanation; the end result is that it's something that even as root you wouldn't want to do. The correct magic is 'rm -r', which (r)ecursively deletes all directories and files in and under the named directory (or file). See also the info page ('info rm') for more information. (Linux doesn't support unlink()ing directories, and running 'fsck' every time you removed a directory would get to be a real pain *real* quickly.) -- David Maze [EMAIL PROTECTED] http://www.mit.edu/~dmaze/ Theoretical politics is interesting. Politicking should be illegal. -- Abra Mitchell
Re: rm question
To recursively remove a directory foo, all files and subdirectories, and not be queried about the request: rm -rf foo Please note that this is not an undoable operation, and you can seriously fsck things up if you do the wrong thing, particularly as root. One trick I'll sometimes do when I don't trust my fingers is to change permissions on the directory tree first, to something other than root (this can be an annoying problem if you get it wrong, but is rarely fatal). Then I 'su' to that user and remove the files: su - cd foo/.. chmod -R nobody.nobody foo ls -l# Did you do what you meant to do? su nobody rm -rf foo User 'nobody' should have minimal permissions, and shouldn't be able to hurt anything significant on the system. On Tue, Mar 28, 2000 at 04:47:38PM +, Antonio Rodriguez wrote: I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Thanks, Antonio. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- Karsten M. Self (kmself@ix.netcom.com) What part of Gestalt don't you understand? http://gestalt-system.sourceforge.net/
Re: rm question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 try rm -f [dir] Syd - - Original Message - From: Antonio Rodriguez [EMAIL PROTECTED] To: debian-user@lists.debian.org Sent: Tuesday, March 28, 2000 11:47 Subject: rm question I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Thanks, Antonio. - -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.2 for non-commercial use http://www.pgp.com iQA/AwUBOOAx+OK9EUm3VE1YEQL3xgCbBBr+f0AZkAbQWOqMlSI0BbiKEyIAn39o XOwpJwR4pXup2DM1GDZL/MUq =hU7o -END PGP SIGNATURE-
Re: rm question
On Tue, Mar 28, 2000 at 04:47:38PM +, Antonio Rodriguez wrote: I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Thanks, Antonio. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null use rm -rf dirname -- Maurizio Boriani General Services (Systemist) 20138 Milano - Via Mecenate 76/3 - Italy Tel. 02/509081 - Fax 02/50908080 - E-mail [EMAIL PROTECTED] pgpuifbYvM9Au.pgp Description: PGP signature
rm question
I want to delete a directory with a whole bunch of embeded subdirectories, I did rm -d kdeo and I get Operation not permitted. Now, I am doing it as root, so, the permission should not be an issue. Whats the problem? Is there a better way of removing a sequence of such embedded directories? Thanks, Antonio.